whats the reason for allowing like
foo,
to be a tuple? why not make this a syntax error? is there a use for single value tuples?
foo,
to be a tuple? why not make this a syntax error? is there a use for single value tuples?
The thing is, your example is the way tuple should be defined. The parenthesis are merely allowed (and ignored). Why? I see this as a mistake of language creators. But to be fair, it is difficult to make a perfect language (or anything really), and Python is pretty close imho.