A RetroSearch Logo

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

Search Query:

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

[Python-Dev] builtin_id() returns negative numbers

[Python-Dev] builtin_id() returns negative numbers [Python-Dev] builtin_id() returns negative numbersTim Peters tim.peters at gmail.com
Thu Feb 17 19:44:11 CET 2005
[Tim Peters]
>>         # This is a puzzle:  there's no way to know the natural width of
>>         # addresses on this box (in particular, there's no necessary
>>         # relation to sys.maxint).
 
[Armin Rigo]
> Isn't this natural width nowadays available as:
> 
>    256 ** struct.calcsize('P')
> 
> ?

Looks right to me -- cool!  I never used struct's 'P' format because
it always appeared useless to me:  even if I could ship pointers
across processes or boxes, there's not much I could do with them after
getting integers back from unpack().  But silly me!  I'm sure Guido
put it there anticipating the need for calcsize('P') when making a
positive_id() function in Python.

Now if you'll just sign and fax a Zope contributor agreement, I'll
upgrade ZODB to use this slick trick <wink>.
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