why () is () and [] is [] work in other way?
Rotwang
sg552 at hotmail.co.uk
Fri Apr 20 23:25:36 EDT 2012
On 21/04/2012 01:01, Roy Smith wrote:
> In article<877gxajit0.fsf at dpt-info.u-strasbg.fr>,
> Alain Ketterlin<alain at dpt-info.u-strasbg.fr> wrote:
>
>> Tuples are immutable, while lists are not.
>
> If you really want to have fun, consider this classic paradox:
>
>>>> [] is []
> False
>>>> id([]) == id([])
> True
Huh. This is not what I would have expected. What gives?
--
Hate music? Then you'll hate this:
http://tinyurl.com/psymix
More information about the Python-list
mailing list