[Python-Dev] id() on Win64 (was: CVS: python/dist/src/Python bltinmodule.c,2.162,2.163)
Guido van Rossum
guido@beopen.com
Wed, 28 Jun 2000 18:10:52 -0500
> > [GvR: note that this means that id() can now return a long on Win32
> > platforms. This *might* break some code...]
>
> Strictly speaking: the Long only occurs on Win64 platforms.
You're right.
> I would guess that it is also possible on say, an Alpha running Linux.
> Presuming that has 64-bit pointers(?).
No, because their longs are also 64 bits, and hence so are Python ints.
> 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 :-)
That depends. It is documented as an integer -- which may be vague
enough to encompass longs, but that's weasel-wording. ;-)
I do think that the likelihood of this breaking significant code is low.
--Guido van Rossum (home page: http://www.python.org/~guido/)