Why new Python 2.5 feature "class C()" return old-style class ?

Alex Martelli aleaxit at yahoo.com
Mon Apr 17 22:14:18 EDT 2006


Aahz <aahz at pythoncraft.com> wrote:

> In article <1hdwol0.luxoeathwi1cN%aleaxit at yahoo.com>,
> Alex Martelli <aleaxit at yahoo.com> wrote:
> >Aahz <aahz at pythoncraft.com> wrote:
> >> 
> >> Method resolution order is the primary up-front difference, but
> >> introspective code can also have problems.  
> >
> >The crucial difference between the old-style classes and the new ones
> >is about how Python lookups special methods.
> 
> Right.  Thanks!  I don't actually use new-style classes much myself, so
> I forgot about that one.  (And I needed it for the draft that's due
> today...)

Glad to have been of help, then!  BTW, I use new-style classes almost
exclusively (except when maintaining legacy code, or, up to 2.4, for
exceptions)...


Alex



More information about the Python-list mailing list