singletion模块
class Test(): pass a = Test()
调用模块
from singleton.test import a if __name__ == "__main__": for item in range(10): b = a print(id(b))