python-__new__和__init__
摘要:
1 class A(object): 2 def __init__(self,*args, **kwargs): 3 print "init A" 4 def __new__(cls,*args, **kwargs): 5 print "new A %s"%cls 6 #return super(A 阅读全文
posted @ 2017-02-26 18:01 simple_孙 阅读(10460) 评论(0) 推荐(0)