Serhiy Storchaka <[email protected]> added the comment:
No, it doesn't match the "@dotted_name(arg_list)" pattern.
decorator: "@" `dotted_name` ["(" [`argument_list` [","]] ")"] NEWLINE
call: `primary` "(" [`argument_list` [","] | `comprehension`] ")"
argument_list: `positional_arguments` ["," `starred_and_keywords`]
: ["," `keywords_arguments`]
: | `starred_and_keywords` ["," `keywords_arguments`]
: | `keywords_arguments`
The call syntax contains a special case for generator expression. The decorator
expression syntax dosn't contain it. You should change the grammar rule to
decorator: "@" `dotted_name` ["(" [`argument_list` [","] | `comprehension`]
")"] NEWLINE
for supporting this syntax. Please open a separate topic on Python-Dev for
discussing this language change.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue32012>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com