python~元类

class在定义的时候,也是一个对象

元类就是type()

动态创建一个类:

type(类名, (继承), {属性})

猜你喜欢

转载自blog.csdn.net/CorrectForm/article/details/84292265