[Python-Dev] Re: Re: Re: print "%X" % id(object()) not so nice

Terry Reedy tjreedy at udel.edu
Sat Nov 20 16:12:37 CET 2004


"Bob Ippolito" <bob at redivi.com> wrote in message news:894CD7B9-

> On Nov 20, 2004, at 5:03 AM, Terry Reedy wrote:
>> Is the absolute hex value ever of any use?  If so, how often?

> It makes it quite easy to match pdb output with gdb output! :)

Ah, the missing use case, which you and the OP probably took for granted. 
I, on the other hand, having never used either, find the difference in 
printed ids in

>>> def f(): pass
...
>>> f, id(f)
(<function f at 0x00868158>, 8814936)

at least mildly disturbing.  Do you only need to do such matching for 
complex objects that get the <type name at 0x########> representation?

Terry J. Reedy





More information about the Python-Dev mailing list