Andrés Delfino <adelf...@gmail.com> added the comment:

The thing is that "tuple displays" like:

nums = (n for n in range(10))

Yield a generator expression instead of a tuple.

Also, unparenthesized "tuple displays" like 1, 2, 3 can't be used in 
expressions, AFAIK:

>>> if 3 == 1, 2, 3:
SyntaxError: invalid syntax

So, you end up using parenthesized expressions (that may or may not shield 
tuples) to use tuples in expressions. So talking about "tuple expressions" in 
the operator precedence table doesn't make much sense to me :/

Also, if a "tuple display" doesn't yield a tuple, should it be named a "tuple 
display" after all?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33459>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to