> > a is b <==> id(a) == id(b) > > No, not necessarily. id's are recycled which can lead to unexpected > behaviour when comparing them. See for example this thread on c.l.py: > http://tinyurl.com/yflknx
wow, that is totally mind-blowing.. good post. i think that for most normal objects that are *not* created on the fly, the comparison is ok. still, i'd stick to using is... as-is. -- wesley - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "Core Python Programming", Prentice Hall, (c)2007,2001 http://corepython.com wesley.j.chun :: wescpy-at-gmail.com python training and technical consulting cyberweb.consulting : silicon valley, ca http://cyberwebconsulting.com _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor