[Python-Dev] cmp(x,x)
Armin Rigo
arigo at tunes.org
Tue May 18 11:36:07 EDT 2004
Hello Michael,
On Tue, May 18, 2004 at 12:34:13PM +0100, Michael Hudson wrote:
> > A minor semantic change that creeped in some time ago was an implicit
> > assumption that any object x should "reasonably" be expected to compare equal
> > to itself.
>
> I have to admit that I haven't done my research, but I think you have
> your history backwards: the recent change AIUI is that it's possible
> that 'x == x' might be something *other* than Py_True...
Uh? You're probably referring to a much older change. It was possible from
at least Python 2.1, and I don't know if it has ever been impossible. I am
speaking about these two changes in object.c:
----------------------------
revision 2.215
date: 2004/03/21 17:01:44; author: rhettinger; state: Exp; lines: +11 -1
Add identity shortcut to PyObject_RichCompareBool.
----------------------------
and:
----------------------------
revision 2.211
date: 2003/10/28 12:05:47; author: arigo; state: Exp; lines: +8 -180
Deleting cyclic object comparison.
SF patch 825639
http://mail.python.org/pipermail/python-dev/2003-October/039445.html
----------------------------
Armin
More information about the Python-Dev
mailing list