class A(object):
    def foo(self): print "original A"
orig = A()

class A(object):
    def foo(self): print "new A"
new = A()

if type(orig) == type(new):
    print "types are equal"
else:
    print "types are not equal"

orig.foo()
new.foo()

--------

on CPython and IPy 1.1 the output is:
types are not equal
original A
new A

on IPy 2.0 b5:
types are equal
original A
new A

I actually run into this case when testing code that upgrades persistent
pickles to newer version of the class.
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to