[Python-Dev] id() on Win64 (was: CVS: python/dist/src/Python bltinmodule.c,2.162,2.163)

Tim Peters tpeters@beopen.com
Wed, 28 Jun 2000 18:47:04 -0400


[Greg Stein]
> Regardless: yes, it can certainly break some code. IMO, if any code out
> there makes any kinds of assumptions about id(), then they deserve to be
> broken :-)

[Trent Mick]
> Amen.

Guys, it's almost never that simple, and developers are the last ones to
think of the reasonable cases that may break.  In this case, e.g., code may
be doing something as harmless as printing an id() via a "... %d ..." format
in a log, and-- BOOM! --that blows up with an OverflowError if you feed it a
Python long larger than a C long.

I'd rather fix %d formats than leave id() broken, though!  id() has to
return a unique value.

but-i'll-sympathize-with-the-users-even-in-public<wink>-ly y'rs  - tim