[pypy-dev] Re: New style classes

Michael Hudson mwh at python.net
Mon Jul 12 14:10:34 CEST 2004


Richard Emslie <rxe at ukshells.co.uk> writes:

> Hi PyPy ers,
>
> I was wondering why we use old style classes everywhere in the pypy
> code base - esp since pypy only supports new style classes (!).

I'm not sure.  It wasn't my decision, you can be sure of that :-)

> Would anyone have a huge objection to making ObjSpace a new style
> class? (Needed for the trace object space)

No.  I remember thinking the same thing some time back...

>
> Also in CPython you can
>
> class A(object): pass
> class B(object): pass
> a = A()
> a.__class__ = B
>
> but in PyPy we get "AttributeError: read-only attribute".
>
> Is this just a TODO, or is it a feature? ;-)

Uhh... pass :-) I'm certainly unsurprised that it doesn't work right
now...

Cheers,
mwh

-- 
  C++ is a siren song.  It *looks* like a HLL in which you ought to
  be able to write an application, but it really isn't.
                                       -- Alain Picard, comp.lang.lisp




More information about the Pypy-dev mailing list