Why tuples use parentheses ()'s instead of something else like <>'s?
seberino at spawar.navy.mil
seberino at spawar.navy.mil
Wed Dec 29 00:57:02 EST 2004
Tuples are defined with regards to parentheses ()'s as everyone knows.
This causes confusion for 1 item tuples since (5) can be interpreted
as a tuple OR as the number 5 in a mathematical expression
such as x = (5) * (4+6).
Wouldn't it have been better to define tuples with <>'s or {}'s or
something else to avoid this confusion??
Perhaps ()'s are a good idea for some other reason I don't know?
Please enlighten me as I really want to know.
Chris
P.S. I love Python!
More information about the Python-list
mailing list