3.3.6.4. Singleton

Singleton snippets.

class PyDviGui.Tools.Singleton.MetaSingleton(class_name, super_classes, class_attribute_dict)[source]

Bases: type

A singleton metaclass.

This implementation supports subclassing and is thread safe.

class PyDviGui.Tools.Singleton.monostate[source]

Bases: object

A monostate base class.

_shared_state = {}
class PyDviGui.Tools.Singleton.singleton(cls)[source]

Bases: object

A singleton class decorator.

This implementation doesn’t support subclassing.

PyDviGui.Tools.Singleton.singleton_func(cls)[source]

A singleton function decorator.

This implementation doesn’t support subclassing.

Previous topic

3.3.6.3. Platform

Next topic

3.3.7. Widgets

This Page