On Mon, 2014-03-24 at 12:44 +0000, bearophile wrote: […] > I agree, 1-tuples in Python are tricky. Compare it with the clear > Python list literal syntax: > > [] => 0-length list > [1] => 1-length list > [1, 2] => 2-length list > [1, 2, 3] => 2-length list
But note that: [1,] => 1-length list [1, 2,] => 2-length list [1, 2, 3,] => 2-length list Do not underestimate the power of allowed trailing commas. -- 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
