why () is () and [] is [] work in other way?
Albert van der Horst
albert at spenarnc.xs4all.nl
Tue May 1 06:49:41 EDT 2012
More information about the Python-list mailing list
Tue May 1 06:49:41 EDT 2012
- Previous message (by thread): geoinfo with python
- Next message (by thread): Create directories and modify files with Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
In article <7xvckq4c2j.fsf at ruckus.brouhaha.com>, Paul Rubin <no.email at nospam.invalid> wrote: >Kiuhnm <kiuhnm03.4t.yahoo.it> writes: >> I can't think of a single case where 'is' is ill-defined. > >If I can't predict the output of > > print (20+30 is 30+20) # check whether addition is commutative > print (20*30 is 30*20) # check whether multiplication is commutative > >by just reading the language definition and the code, I'd have to say >"is" is ill-defined. The output depends whether the compiler is clever enough to realise that the outcome of the expressions is the same, such that only one object needs to be created. What is ill here is the users understanding of when it is appropriate to use "is". Asking about identity of temporary objects fully under control of the compiler is just sick. Groetjes Albert -- -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert at spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst
- Previous message (by thread): geoinfo with python
- Next message (by thread): Create directories and modify files with Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list