New submission from Nick Coghlan <ncogh...@gmail.com>:

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.

----------
assignee: docs@python
components: Documentation
messages: 306205
nosy: docs@python, gvanrossum, ncoghlan, serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: Nominal decorator function call syntax is inconsistent with regular 
function calls
type: behavior

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32024>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to