client.py
class Client():
__instance=None
#https://segmentfault.com/q/1010000011464539?sort=created
def __new__(cls, *args, **kwargs):
if cls.__instance is None:
cls.__instance = super(Client, cls).__new__(cls)
return cls.__instance
import client.Client
跟
import Client
会产生2个实体