Message306205
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. |
|
Date |
User |
Action |
Args |
2017-11-14 13:09:52 | ncoghlan | set | recipients:
+ ncoghlan, gvanrossum, docs@python, serhiy.storchaka |
2017-11-14 13:09:52 | ncoghlan | set | messageid: <1510664992.07.0.213398074469.issue32024@psf.upfronthosting.co.za> |
2017-11-14 13:09:51 | ncoghlan | link | issue32024 messages |
2017-11-14 13:09:51 | ncoghlan | create | |
|