At 09:15 AM 2/20/05 +0100, Alex Martelli wrote:
This is because types.ClassType turns somersaults to enable this: in this latter construct, Python's mechanisms determine ClassType as the metaclass (it's the metaclass of the first base class), but then ClassType in turn sniffs around for another metaclass to delegate to, among the supplied bases, and having found one washes its hands of the whole business;-).

To be pedantic, the actual algorithm in 2.2+ has nothing to do with the first base class; that's the pre-2.2 algorithm. The 2.2 algorithm looks for the most-derived metaclass of the base classes, and simply ignores classic bases altogether.


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to