|
 |
Darren New wrote:
> Not in Python. The cosntructor for a 2-tuple is ,
> No parens needed. Figure *that* one out. :-)
This isn't *quite* correct, since a single comma can construct either a
1-tuple or a 2-tuple depending on how it's used:
"foo", --> 1-tuple
"foo",bar --> 2-tuple
It's probably best to view the tuple constructor as a comma, which can
be used as a binary operator or as a unary postfix operator (ignoring
3-n-tuples of course).
Post a reply to this message
|
 |