On 10/23/10 10:20 PM, Robert Bradshaw wrote:

In most cases, it's really the comma (not the parentheses) that
creates the tuple.

sage: a = 123,
sage: a
(123,)

The parentheses are often needed for grouping purposes though.


Aha. That agrees with http://docs.python.org/reference/expressions.html#parenthesized-forms

"Note that tuples are not formed by the parentheses, but rather by use of the comma operator. The exception is the empty tuple, for which parentheses are required — allowing unparenthesized “nothing” in expressions would cause ambiguities and allow common typos to pass uncaught."

Thanks,

Jason


--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to