Re: The 'is' identity operator checking immutable values caution

2008-05-13 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : We have to avoid the use of the 'is' identity operator with basic, immutable values such as numbers and strings. The result is unpredictable because of the way Python handles these objects internally. How is with this issue in Python 3.0? Is it fixed? Does Python hand

Re: The 'is' identity operator checking immutable values caution

2008-05-13 Thread castironpi
On May 13, 5:37 am, Christian Heimes <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > We have to avoid the use of the 'is' identity operator with basic, > > immutable values such as numbers and strings. The result is > > unpredictable because of the way Python handles these objects > >

Re: The 'is' identity operator checking immutable values caution

2008-05-13 Thread Christian Heimes
[EMAIL PROTECTED] schrieb: > We have to avoid the use of the 'is' identity operator with basic, > immutable values such as numbers and strings. The result is > unpredictable because of the way Python handles these objects > internally. You are confusing immutable objects with singletons. Never use

Re: The 'is' identity operator checking immutable values caution

2008-05-13 Thread Marco Mariani
[EMAIL PROTECTED] 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 l

Re: The 'is' identity operator checking immutable values caution

2008-05-13 Thread castironpi
On May 13, 5:10 am, [EMAIL PROTECTED] wrote: > We have to avoid the use of the 'is' identity operator with basic, > immutable values such as numbers and strings. The result is > unpredictable because of the way Python handles these objects > internally. > > How is with this issue in Python 3.0? Is