The 'is' identity operator checking immutable values caution

Marco Mariani marco at sferacarta.com
Tue May 13 06:26:13 EDT 2008


wxPythoner at gmail.com wrote:

> We have to avoid the use of the 'is' identity operator with basic,
> immutable values such as numbers and strings.

I'm glad for you. Did you really write checks like "if foo is 27" ?

The point is, you have to learn technologies to use them. It's not like 
technologies learn you (not even in soviet Russia)

> How is with this issue in Python 3.0? Is it fixed?

There is nothing to fix.

> Does Python handle this things properly now?

It always did.



More information about the Python-list mailing list