[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>.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to