CONSTRUCT - New/Old Style Classes, build-in/extension types

Ilias Lazaridis ilias at lazaridis.com
Sat Sep 23 08:14:41 EDT 2006


Steve Holden wrote:
> Ilias Lazaridis wrote:
>> Steve Holden wrote:
...
>>> Though of course the easiest way to enforce your classes to new style is
>>> to begin each module with
>>>
>>> __metaclass__ = type
>>
>> I assume placing this in the central site import (e.g.
>> sitecustomize.py) would collapse python? (I don't want to try it, maybe
>> someone has an isolated instance available for trials).
>>
> I don't think it would "collapse Python", but since each module requires 
> its own __metaclass__ setting it certainly wouldn't change much.

I understand.

Thus I cannot set "__metaclass__ = object" on e.g. project-level or 
site-level, but only module-level.

.

-- 
http://lazaridis.com



More information about the Python-list mailing list