Re: Q about object identity

2008-06-06 Thread Ethan Furman
[EMAIL PROTECTED] wrote: Hello, I am testing object identity. If I do it from the interpreter, I get strange results. *print [] is []* *False* print id([]), id([]) 3083942700 3083942700 Why is that? Isn't this an error? If I test it in a script, all is OK. #!/usr/bin/python a

Re: Q about object identity

2008-06-06 Thread Tommy Grav
On Jun 6, 2008, at 4:27 PM, Ethan Furman wrote: [EMAIL PROTECTED] wrote: Hello, I am testing object identity. If I do it from the interpreter, I get strange results. *print [] is []* *False* print id([]), id([]) 3083942700 3083942700 Why is that? Isn't this an error? in the first

Q about object identity

2008-06-03 Thread vronskij
Hello, I am testing object identity. If I do it from the interpreter, I get strange results. print [] is [] False print id([]), id([]) 3083942700 3083942700 Why is that? Isn't this an error? If I test it in a script, all is OK. #!/usr/bin/python a = [] b = [] print a == b print a is

Re: Q about object identity

2008-06-03 Thread Christian Heimes
[EMAIL PROTECTED] schrieb: Hello, I am testing object identity. If I do it from the interpreter, I get strange results. print [] is [] False print id([]), id([]) 3083942700 3083942700 Why is that? Isn't this an error? No, it's not an error. You are getting this result

Re: Q about object identity

2008-06-03 Thread vronskij
On 3. Jún, 23:08 h., Christian Heimes [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] schrieb: Hello, I am testing object identity. If I do it from the interpreter, I get strange results. print [] is [] False print id([]), id([]) 3083942700 3083942700 Why is that? Isn't this an

Re: Q about object identity

2008-06-03 Thread Marc 'BlackJack' Rintsch
On Tue, 03 Jun 2008 23:08:46 +0200, Christian Heimes wrote: [EMAIL PROTECTED] schrieb: Hello, I am testing object identity. If I do it from the interpreter, I get strange results. print [] is [] False print id([]), id([]) 3083942700 3083942700 Why is that? Isn't this an