[Python-Dev] Re: Comparison of cyclic objects

Jeremy Hylton jeremy@cnri.reston.va.us
Thu, 13 Apr 2000 22:14:11 -0400 (EDT)


>>>>> "KPY" == Ka-Ping Yee <ping@lfw.org> writes:

  KPY> On Thu, 13 Apr 2000, Jeremy Hylton wrote:
  >> 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.

  KPY> Very, very cool.  Well done.  Say, when did printing get fixed?

Looks like the repr checkin was pre-1.5.1.

I glanced at the sameness code in E, and it looks like it is doing
exactly the same thing.  It keeps a mapping of comparisons seen sofar
and returns true for them.  It seems that E's types don't define their
own methods for sameness, though.  The same methods seem to understand
the internals of the various E types.  Or is it just a few special
ones.

Jeremy