[pypy-dev] Saving and reloading JIT optimizations

Armin Rigo arigo at tunes.org
Sat Aug 20 11:39:41 CEST 2011


Hi Zooko,

On Fri, Aug 19, 2011 at 5:38 PM, Zooko O'Whielacronx <zooko at zooko.com> wrote:
> conservative method of determining if two classes are the same. For
> example: if they have identical Python source code and their
> superclasses are the same (in this sense).

This cannot be something you can rely on.  I can define Python classes
that have identical Python source code and superclasses, yet are
totally different.  For example,

    class A(object): pass
    A.foo = 42
    A1 = A
    class A(object): pass
    A.foo = 43
    A2 = A

So no, there is no way at all to make this idea work in general; you
can only do hacks that hopefully don't break too often.  I am not
interested :-)


A bientôt,

Armin.


More information about the pypy-dev mailing list