R. David Murray <rdmur...@bitdance.com> added the comment: That's a generator expression, just like [x for x in ramge(3)] is a list comprehension, not a list display. And yes, in a number of circumstances parenthesis are required to delimit the tuple display and disambiguate the syntax. That is, it is the 1, 2, 3 that is the tuple display, but sometimes you have to enclose it in parenthesis in order for the parser to recognize it. Which is why it would be good to give a more thorough explanation of what a tuple display is than the unlabeled one Cheryl pointed out. I'm not entirely sure what the exact rules are for when you get a syntax error without the parens, myself :)
---------- _______________________________________ 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