Peter Otten wrote: > You determine the factory Python uses to > make a class by adding > > __metaclass__ = factory > > to the class body, so you'll probably end with something like > > class ProducerHandlerType(type): > # your code > > class A: > __metaclass__ = ProducerHandlerType > > The subclasses of A will now invoke your customised metaclass machinery.
This is the most perfectly succinct description of the __metaclass__ attribute I have ever seen. Beautiful. James -- http://mail.python.org/mailman/listinfo/python-list