Singleton

class lsst.daf.butler.core.utils.Singleton

Bases: type

Metaclass to convert a class to a Singleton.

If this metaclass is used the constructor for the singleton class must take no arguments. This is because a singleton class will only accept the arguments the first time an instance is instantiated. Therefore since you do not know if the constructor has been called yet it is safer to always call it with no arguments and then call a method to adjust state of the singleton.

Methods Summary

__call__() Call self as a function.
mro($self, /) Return a type’s method resolution order.

Methods Documentation

__call__() → Any

Call self as a function.

mro($self, /)

Return a type’s method resolution order.