Re: How to test if an object IS another object?

2005-06-12 Thread eloff777
Fascinating. With small strings, it uses the same object, and with small numbers like 3. With 300 they were different objects (why, shouldn't they both be ints still?) Mutable objects functioned differently as you suggested: >>>foo = [] >>>bar = [] >>>foo == bar True >>>foo is bar False Tuples (

Re: How to test if an object IS another object?

2005-06-12 Thread eloff777
Sorry about removing my message, I posted with the wrong google account, I don't really want my email where those irritating spam bots can find it. >The most obvious way (as usual ?): > >if obj1 is obj2: > // your code here I immediately thought of is, and tested it in the console, but it didn't