Mark Dickinson <dicki...@gmail.com> added the comment:

Ah, now I understand :)

r2604 introduced a scheme where for a negative PyLongObject x with n digits, 
the value stored in x->ob_size was -1-n.  A little like ones' complement, but 
unrelated to anything to do with the platform integer representation.  So at 
that stage there were two possible internal representations of 0L, which is why 
all the ZABS() stuff was necessary to make sure that those two representations 
of 0L compared equal.

r2751 (in 1992, indeed!) reversed this, using -n instead of -1-n for this case, 
but didn't remove the extra tests for the two different representations of 0L.  
r2751 also changed the semantics of long bitwise operations for negative 
numbers, but that's not relevant to this issue.

Sorry for being slow.

It's impressive that this piece of redundant code has survived this long.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8659>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to