CONSTRUCT - New/Old Style Classes, build-in/extension types
Steve Holden
steve at holdenweb.com
Fri Sep 22 15:20:56 EDT 2006
Ilias Lazaridis wrote:
> Steve Holden wrote:
>
>>Paul Boddie wrote:
>>
>>>Ilias Lazaridis wrote:
>>
>>[...]
>>
>>>>Have those old style classes any benefits?
>>>
>>>
>>>That you don't have to write the bizarre conceptual accident that is
>>>"(object)" when declaring a "top-level" class?
>>>
>>
>>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.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden
More information about the Python-list
mailing list