mirror of
https://github.com/antonioCoco/SharPyShell
synced 2026-06-08 13:11:44 +00:00
7 lines
243 B
Python
7 lines
243 B
Python
class Singleton(object):
|
|
_instances = {}
|
|
|
|
def __new__(cls, *args, **kwargs):
|
|
if cls not in cls._instances:
|
|
cls._instances[cls] = super(Singleton, cls).__new__(cls, *args, **kwargs)
|
|
return cls._instances[cls] |