元类

python中的造物者

 1、注:key-- 函数的名字;value-空间地址

格式是: xx=type('类的名字',('父类的名字',),{‘key’:‘value’})

f=type('Aa',(object,),{'name':'lfj'})

l=f()

print(f.name)

验证help(f)

2、

 

posted on 2018-09-26 16:33  市外桃源  阅读(112)  评论(0)    收藏  举报

导航