min and max id numbers

Paul Rubin http
Sat Dec 6 00:48:06 EST 2003


"r.e.s." <r.s at XXmindspring.com> writes:
> Still, if it were a game played on one machine, surely
> some of the experts around here could come pretty close 
> to finding a LO and a HI object.  No?

The id of an object in CPython is just its memory address.  Obviously
you could not guarantee the HI object staying higher than all the
other objects since the interpreter can always allocate more memory.
To do what you're asking you'd have to modify the interpreter to have
a new kind of sentinel object and have ident return special values for
those objects.  I guess you could do that if you really wanted, but it
would be a crazy crock.




More information about the Python-list mailing list