石头场
pgt112you_cu
全部博文(67)
Django(10)
2011年(10)
2010年(28)
2009年(29)
imchacal
qq362477
分类: Python/Ruby
2009-10-19 21:55:59
#coding:utf-8 class FA(type): def __new__(cls, name, base, attr): print name print base print attr print "it is in fa's new" new_obj = super(FA, cls).__new__(cls, name, base, attr) return new_obj class FB(object): __metaclass__ = FA def __init__(self): print "it is in FB's init" b = FB()
上一篇:Python list [:]
下一篇:[转]Python set类型的一些简单应用
登录 注册