MyType SubType MyObject
  1. class MyType(type): pass
  2.  
  3. class SubType(MyType): pass
  4.  
  5. class MyObject(object):
  6.  __metaclass__ = MyType
  7.  
  8. print("MyType.__class__ = %s" % (MyType.__class__))
  9. print("SubType.__class__ = %s" % (SubType.__class__))
  10. print("MyObject.__class__ = %s" % (MyObject.__class__))
Parsed in 0.007 seconds