bpo-32012: Disallow trailing comma after genexpr without parenthesis.#4382
Conversation
b0bfcb7 to
db4aafc
Compare
November 12, 2017 22:44
ncoghlan
left a comment
There was a problem hiding this comment.
The test and compiler updates look good to me, just some minor grammar suggestions for the NEWS entry.
Sorry, something went wrong.
ncoghlan
left a comment
There was a problem hiding this comment.
I think this version goes too far - decorator factories that accept generator expressions don't break any syntactic design principles, and we don't check for any other "definitely not a valid base class" expressions in base class lists.
(The latter change might be an interesting one to make, but it should be a separate enhancement request that checks for all the constructs with a guaranteed non-class return type, and explicitly considers the question of metaclasses that might be doing something unusual with the base class list)
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
benjaminp
left a comment
There was a problem hiding this comment.
This seems to disallow a lot more than trailing commas in call genexps.
Sorry, something went wrong.
Only makes the implementation more conforming to the specification. |
Sorry, something went wrong.
|
I have made the requested changes; please review again. |
Sorry, something went wrong.
|
Thanks for making the requested changes! @ncoghlan: please review the changes made to this pull request. |
Sorry, something went wrong.
ncoghlan
left a comment
There was a problem hiding this comment.
Thanks! We can follow up on the others on the issue tracker, and potentially take them to python-dev if Guido thinks that's appropriate.
Sorry, something went wrong.
This expression is broken by: bpo-32012: Disallow trailing comma after genexpr without parenthesis. python/cpython#4382 python/cpython@9165f77
This expression is broken by: bpo-32012: Disallow trailing comma after genexpr without parenthesis. python/cpython#4382 python/cpython@9165f77
https://mail.python.org/pipermail/python-dev/2017-November/150481.html
https://bugs.python.org/issue32012