On Fri, 06 Mar 2009 16:26:46 -0800, Paul Rubin wrote:

> Gary Herron <gher...@islandtraining.com> writes:
>>   Experts: Singleton immutable types *may* be compared with "is",
> 
> That is absolutely wrong:
> 
>     >>> a = 2^100
>     >>> b = 2^100
>     >>> a == b
>     True
>     >>> a is b
>     False

What should this example show?  And where's the singleton here?  BTW:

In [367]: a = 2 ^ 100

In [368]: b = 2 ^ 100

In [369]: a == b
Out[369]: True

In [370]: a is b
Out[370]: True

Ciao,
        Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to