백엔드 프레임 설계
This commit is contained in:
1 parent
d264104077
commit
f7833ba466
62 files changed
+1397
No files matched your search
@@ -0,0 +1,16 @@
|
||||
class Singleton:
|
||||
_init = False
|
||||
|
||||
def __new__(cls, *args, **kwargs):
|
||||
if not hasattr(cls, "instance"):
|
||||
cls.instance = super(Singleton, cls).__new__(cls)
|
||||
|
||||
return cls.instance
|
||||
|
||||
@classmethod
|
||||
def is_init(cls):
|
||||
return cls._init
|
||||
|
||||
@classmethod
|
||||
def set_init(cls):
|
||||
cls._init = True
|
||||
Reference in new issue
Block a user