[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>.
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