assignment to __class__ (was Re: Copy constructors)

Roman Suzi rnd at
Mon Aug 13 16:23:15 CEST 2001

On Mon, 13 Aug 2001, Guido van Rossum wrote:

> Glyph Lefkowitz <glyph at> writes:
> > Can you point me (and other readers just coming to this discussion) to a
> > few URLs illuminating the key differences between 'new-style' and
> > 'old-style' classes?  I'm going to do some reading up on the various PEPs,
> > but if there are any posts on python-dev I can refer to...
> The PEPs, the source code, and the unification tutorial at

I even think that maybe day comes when Python will not need SWIG to use C
(and maybe C++) libraries directly and efficiently.

> > Aye, now there's the rub.  If we have uniform introspection, there's a
> > certain expectation that features like this become _easier_ to use, not
> > harder.  Introspection is a powerful feature, all the more powerful if
> > it's uniform and systematic.
> To me, introspection means being able to look at yourself, not
> necessarily being able to modify yourself.  The new scheme definitely
> makes discovery of features of objects easier -- you can *always* just
> look at __class__.__dict__ etc.

> Actually, speeding up Python is a very common request.  You probably
> ignored those threads because *you* don't need it.  That is, until
> more people use your code. :-)

But will PEP25{2,3,4} really make Python faster?

Sincerely yours, Roman A.Suzi
 - Petrozavodsk - Karelia - Russia - mailto:rnd at -

More information about the Python-list mailing list