1
0
mirror of https://github.com/MarkParker5/STARK.git synced 2024-11-24 08:12:13 +02:00
STARK/General/Singleton.py

10 lines
199 B
Python
Raw Normal View History

from abc import ABC
class Singleton(ABC):
# Singleton
def __new__(cls):
if not hasattr(cls, 'instance'):
cls.instance = super().__new__(cls)
return cls.instance