[Python-Dev] Re: Comparison of cyclic objects
Jeremy Hylton
jeremy@cnri.reston.va.us
Thu, 13 Apr 2000 19:19:30 -0400 (EDT)
Looks like the proposed changed to PyObject_Compare matches E for your
example. The printed representation doesn't match, but I'm not sure
that is as important.
>>> tight = [1, None, "x"]
>>> tight[1] = tight
>>> tight
[1, [...], 'x']
>>> loose = [1, [1, None, "x"], "x"]
>>> loose[1][1] = loose
>>> loose
[1, [1, [...], 'x'], 'x']
>>> tight
[1, [...], 'x']
>>> tight == loose
1
Jeremy