摘要:
class Test(object): __instance = None def __init__(self): print(" init方法 ") def __new__(cls): print(" new方法 ") if cls.__instance == None: cls.__instan 阅读全文
摘要:
class InputException(Exception): '''自定义的异常类''' def __init__(self,length,atleast): self.length = length self.atleast = atleast def test_except(): try: 阅读全文