Module Expr Str ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults vararg body Assign AttributeStore NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults vararg kwarg body If AttributeLoad NameLoad attr body Raise Call NameLoad BinOpAdd BinOpAdd Str AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Return AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore NameLoad decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Pass decorator_list ClassDef bases NameLoad body Assign NameStore NameLoad decorator_list
N/A N/A 
Singleton

This module defines a "super singleton" class that verifies only once instance
is actually created.  It allows the class designating itself as a singleton to
be inherited, still retains its singletoness, but makes sure that derived classes
aren't created first.

Test classes A -> B -> C where A is a singleton.  B can be created before A, and
calls for A will return the instance of B.  But if B is created, C cannot be created,
since a new C would imply a new instance of B.
 N/A debugging _SingletonMetaclass N/A type N/A __init__ N/A N/A cls N/A args N/A N/A N/A cls _singleton_instance None N/A old_cls_init N/A cls __init__ __init_trap__ N/A N/A self N/A args kwargs N/A N/A N/A cls _singleton_instance N/A N/A N/A RuntimeError N/A N/A instance of  N/A cls __name__  has already been created N/A N/A old_cls_init self args kwargs N/A N/A cls _singleton_instance self N/A N/A N/A cls __init__ __init_trap__ N/A N/A N/A N/A super _SingletonMetaclass cls __init__ args N/A __call__ N/A N/A cls N/A args kwargs N/A N/A N/A N/A cls _singleton_instance None N/A N/A N/A cls _singleton_instance N/A N/A N/A super _SingletonMetaclass cls __call__ args kwargs N/A N/A cls _singleton_instance N/A N/A Singleton N/A object N/A N/A __metaclass__ _SingletonMetaclass N/A _SingletonLoggingMetaclass N/A _SingletonMetaclass N/A debugging _LoggingMetaclass N/A N/A N/A SingletonLogging N/A object N/A N/A __metaclass__ _SingletonLoggingMetaclass N/A