
19 Dec
2006
19 Dec
'06
5:51 p.m.
On Tue, Dec 19, 2006 at 10:41:56PM +0000, Neil Mitchell wrote:
A weird question, what does the 1 element tuple look like?
() -- 0 element tuple (,) a b -- 2 element tuple (,,) a b c -- 3 element tuple
() a - meaningless (a) - a in brackets ... Thoughts?
Python uses the syntax (foo,) to denote a singleton tuple (that is an extra comma at the end); quoting the python tutorial "Ugly, but effective".