zero.misc module¶
Miscellaneous functions
-
class
zero.misc.ChangeFlagDict(*args, **kwargs)[source]¶ Bases:
dictDict with flag which gets set when a change is made after initialisation.
-
class
zero.misc.Downloadable(info_stream=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, progress=True, timeout=None, **kwargs)[source]¶ Bases:
objectMixin for downloadable URL classes, providing a progress bar.
-
class
zero.misc.NamedInstance[source]¶ Bases:
abc.ABCMetaMetaclass to implement a single named instance pattern
This ensures that there is only ever one instance of a class with a specific name, as provided by the “name” constructor argument.
This is a subclass of ABCMeta so that it can be used as a metaclass of a subclass of an ABCMeta class.
-
class
zero.misc.Singleton[source]¶ Bases:
abc.ABCMetaMetaclass implementing the singleton pattern
This ensures that there is only ever one instance of a class that inherits this one.
This is a subclass of ABCMeta so that it can be used as a metaclass of a subclass of an ABCMeta class.