[EMAIL PROTECTED] wrote:
>     Nick> Any old code could be fixed by putting "from types import
>     Nick> ClassType as __metaclass__" at the top of the affected modules.
> 
> Which would be, what, 90% of all Python code written that defines classes?

I generally don't allow old-style classes in any code I have control over 
(well, aside from exceptions). Having to type '(object)' all the time is 
annoying, but less annoying than trying to figure out which set of semantics a 
given class is using. My interpreter startup script even includes 
"__metaclass__ = None" in order to disable the implicit metaclass.

I think it's an artifact of only seriously starting to use Python with version 
2.2.2 - I don't really understand how old-style classes work, so I try to 
avoid using them.

However, you raise a fair point, which is why I raised the suggestion of 
respecting a "__metaclass__" definition in the builtins, allowing application 
developers to perform their own new-style class smoke test prior to Py3k.

Cheers,
Nick.

-- 
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
_______________________________________________
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