Skip to content

singleton

dandy.core.singleton

Singleton

__new__

Source code in dandy/core/singleton.py
4
5
6
7
def __new__(cls, *args, **kwargs):
    if cls._instance is None:
        cls._instance = super(Singleton, cls).__new__(cls, *args, **kwargs)
    return cls._instance