about id()...

Jeff Pinyan jeffp at crusoe.net
Sat Mar 18 14:57:32 EST 2000


Hmm.  Blah:

  for a in range(150):
    if id(a) != id(a+0): print a

gives me numbers from 100 to 149.

Why is this?  It's some internal magick on Python's part, isn't it...

-- 
MIDN 4/C PINYAN, NROTCURPI, US Naval Reserve             japhy at pobox.com
http://www.pobox.com/~japhy/                  http://pinyaj.stu.rpi.edu/
PerlMonth - An Online Perl Magazine            http://www.perlmonth.com/
The Perl Archive - Articles, Forums, etc.    http://www.perlarchive.com/




More information about the Python-list mailing list