Hi,

(len(['']) is 1) == (len(['']) == 1) => True

Is this the case for all numbers? I've tried running the following:

for i in range(10000):
        for j in range(10000):
                if i != j:
                        assert id(i) != id(j), 'i=%d, j=%d, id=%d' % (i, j, id
(i))

which executes fine. Hence, 0-9999 is okey... But this is a relatively 
small range, and sooner or later you probably get two numbers with the same 
id... Thoughts anyone?

Regards Tor Erik

PS: For those of you who don't know: keyword is compares object identities
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to