The tl;dr version
The type(obj)
function gets you the type of an object.
The type()
of a class is its metaclass.
To use a metaclass:
class Foo(object):
__metaclass__ = MyMetaClass
type
is its own metaclass. The class of a class is a metaclass-- the body of a class is the arguments passed to the metaclass that is used to construct the class.
Here you can read about how to use metaclasses to customize class construction.