mirror of
https://github.com/python/cpython.git
synced 2024-11-28 04:15:11 +08:00
1c917072ca
"for <var> in <testlist> may no longer be a single test followed by a comma. This solves SF bug #431886. Note that if the testlist contains more than one test, a trailing comma is still allowed, for maximum backward compatibility; but this example is not: [(x, y) for x in range(10), for y in range(10)] ^ The fix involved creating a new nonterminal 'testlist_safe' whose definition doesn't allow the trailing comma if there's only one test: testlist_safe: test [(',' test)+ [',']] |
||
---|---|---|
.. | ||
.cvsignore | ||
Grammar |