Terry Reedy wrote:
>>>>def id(o, max = 2**32):
>
> ... i = __builtins__.id(o)
> ... return (i < 0) and (max - i) or i
> ...
>
This code doesn't need an extra parameter:
def id(o):
return (sys.maxint * 2 + 1) & __builtins__.id(o)
--
-- Scott David Daniels
Scott.Daniels at Acm.Org