ParserDict

class baseband.vlbi_base.header.ParserDict(method, name=None, doc=None)[source] [edit on github]

Bases: object

Create a lazily evaluated dictionary of parsers, setters, or defaults.

Implemented as a non-data descriptor. When first called on an instance, it will create a dict under its own name in the instance’s __dict__, which means that any further attribute access will return that dict instead of this descriptor.

Parameters
methodstr

Name of the method on the instance that can be used to create a parser or setter, or get the default, based on a header keyword description. Typically one of ‘make_parser’, ‘make_setter’, or ‘get_default’.

namestr, optional

If not given, inferred from the method name. Typically, ‘parsers’, ‘setters’, or ‘default’. It must match the name the descriptor is assigned to.

docstr, optional

Docstring for the instance. Defaults to ‘Lazily evaluated dict of name’.