(self, base_class=BaseHeader, default_class=UnstructuredHeader,
                       use_default_map=True)
Create a header_factory that works with the Policy API.

        base_class is the class that will be the last class in the created
        header class's __bases__ list.  default_class is the class that will be
        used if "name" (see __call__) does not appear in the registry.
        use_default_map controls whether or not the default mapping of names to
        specialized classes is copied in to the registry when the factory is
        created.  The default is True.
Create a header_factory that works with the Policy API.
Create a header_factory that works with the Policy API .
def __init__(self, base_class=BaseHeader, default_class=UnstructuredHeader,
                       use_default_map=True):
        """Create a header_factory that works with the Policy API.

        base_class is the class that will be the last class in the created
        header class's __bases__ list.  default_class is the class that will be
        used if "name" (see __call__) does not appear in the registry.
        use_default_map controls whether or not the default mapping of names to
        specialized classes is copied in to the registry when the factory is
        created.  The default is True.

        """
        self.registry = {}
        self.base_class = base_class
        self.default_class = default_class
        if use_default_map:
            self.registry.update(_default_header_map)
def __init__ ( self , base_class = BaseHeader , default_class = UnstructuredHeader , use_default_map = True ) : self . registry = { } self . base_class = base_class self . default_class = default_class if use_default_map : self . registry . update ( _default_header_map )