This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients docs@python, gvanrossum, ncoghlan, serhiy.storchaka
Date 2017-11-14.13:09:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1510664992.07.0.213398074469.issue32024@psf.upfronthosting.co.za>
In-reply-to
Content
Function calls in decorators are implemented as regular function calls, and hence permit the use of generator expressions as their sole argument without a second pair of parentheses.

However, https://docs.python.org/3/reference/compound_stmts.html#function-definitions defines the permitted arguments differently from the way https://docs.python.org/3/reference/expressions.html#calls defines them, and thus technically considers a "function call as a decorator" to be a different construct from "a function call".

The actual implementation treats these as the same thing, so clarification is needed as to whether it is the implementation or the language specification that should be updated to resolve the inconsistency.
History
Date User Action Args
2017-11-14 13:09:52ncoghlansetrecipients: + ncoghlan, gvanrossum, docs@python, serhiy.storchaka
2017-11-14 13:09:52ncoghlansetmessageid: <1510664992.07.0.213398074469.issue32024@psf.upfronthosting.co.za>
2017-11-14 13:09:51ncoghlanlinkissue32024 messages
2017-11-14 13:09:51ncoghlancreate