Hi Zooko,
On Fri, Aug 19, 2011 at 5:38 PM, Zooko O'Whielacronx <[email protected]> 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.
_______________________________________________
pypy-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-dev