20 lines
483 B
Python
20 lines
483 B
Python
|
class AnalyzerState:
|
||
|
_instance = None
|
||
|
|
||
|
def __new__(cls, *args, **kwargs):
|
||
|
if not cls._instance:
|
||
|
cls._instance = super(AnalyzerState, cls).__new__(cls, *args, **kwargs)
|
||
|
return cls._instance
|
||
|
|
||
|
def __init__(self):
|
||
|
self.class_id = 1
|
||
|
self.group_id = 1
|
||
|
self.student_id = 1
|
||
|
|
||
|
def __str__(self):
|
||
|
return f'''
|
||
|
Class: {self.class_id}
|
||
|
Group: {self.group_id}
|
||
|
Student: {self.student_id}
|
||
|
'''
|