__class__可理解为对象所属的父类
class A: def __init__(self,url): self.url = url def out(self): return self.url a = A('news.163.com') print a.out() b = a.__class__('www.bccn.net') print b.out() print A print a.__class__
a.__class__等价于A
元类的理解,
http://www.jb51.net/article/61138.htm