Puzzled by "is"

Erik Max Francis max at alcyone.com
Thu Aug 9 23:25:35 CEST 2007


Grzegorz Słodkowicz wrote:

> That's just theorisation but I'd rather expect the interpreter simply 
> not to create a second tuple while there already is an identical one. 
> This could save some memory if the tuple was large (Although by the same 
> token comparison of large tuples can be expensive). Admittedly the empty 
> tuple is a special case but then 'Special cases aren't special enough to 
> break the rules'.
> 
> A bit odd.

It doesn't save time if you have to check through all the existing 
tuples for matches ...

-- 
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
  San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
   Chance favors the trained mind.
    -- Louis Pasteur



More information about the Python-list mailing list