12 lines
247 B
Python
12 lines
247 B
Python
|
class Singleton:
|
||
|
__instance = None
|
||
|
|
||
|
def __new__(cls, *args, **kwargs):
|
||
|
if cls.__instance is None:
|
||
|
cls.__instance = super(Singleton, cls).__new__(cls)
|
||
|
return cls.__instance
|
||
|
|
||
|
def __init__(self):
|
||
|
pass
|
||
|
|