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
>
>
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