spec2nexus.singletons#

This is an internal library of the spec2nexus software. It is not expected that users of this package will need to call the singletons module directly.

source code documentation#

singletons: Python 2 and 3 Compatible Version

see:

https://stackoverflow.com/questions/6760685/creating-a-singleton-in-python

USAGE:

class Logger(Singleton):
    pass
class spec2nexus.singletons.Singleton(*args, **kwargs)[source]#

Bases: SingletonMeta

Public interface

class spec2nexus.singletons._Singleton[source]#

Bases: type

A metaclass that creates a Singleton base class when called.

_instances = {}#
mro()#

Return a type’s method resolution order.