A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-February/051567.html below:

[Python-Dev] Re: builtin_id() returns negative numbers

[Python-Dev] Re: builtin_id() returns negative numbers [Python-Dev] Re: builtin_id() returns negative numbersFredrik Lundh fredrik at pythonware.com
Tue Feb 15 10:56:58 CET 2005
James Y Knight wrote:

> However, last time this topic came up, this Tim Peters guy argued against it. ;)
>
> Quoting http://mail.python.org/pipermail/python-dev/2004-November/050049.html:
>
>> Python doesn't promise to return a postive integer for id(), although
>> it may have been nicer if it did.  It's dangerous to change that now,
>> because some code does depend on the "32 bit-ness as a signed integer"
>> accident of CPython's id() implementation on 32-bit machines.  For
>> example, code using struct.pack(), or code using one of ZODB's
>> specialized int-key BTree types with id's as keys.

can anyone explain the struct.pack and ZODB use cases?  the first one
doesn't make sense to me, and the other relies on Python *not* behaving
as documented (which is worse than relying on undocumented behaviour,
imo).

</F> 



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4