On Mon, 2014-03-24 at 13:00 +0000, w0rp wrote: […] > > Consider the following. > > >>> (1, 2) > > (1, 2) > > >>> (1) > > 1 > > >>> (1 * (3 * 4,)) > > (-1, ) > > >>> (1 * (3 - 4,) * 2) > > (-1, -1) > > >>> foo = lambda : 3 > > >>> ( > ... foo() > ... ) > > 3 > > >>> ( > ... foo(), > ... ) > > (3, ) > > I see this kind of confusion happen often, and the convenient > syntax becomes a burden.
The moral of the story is that if you want to avoid the situation Python is in, then do not use ( and ) as delimiters for expressions and also something else semantically different. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:[email protected] 41 Buckmaster Road m: +44 7770 465 077 xmpp: [email protected] London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
