Nick Coghlan <ncogh...@gmail.com> added the comment: I created https://bugs.python.org/issue32023 to explicitly cover the base class list case, and after checking the language spec, I agree that case should be a syntax error.
However, `@deco(x for x in [])` should *not* be a syntax error, as: * it's a call with one argument, so the genexp parentheses can be omitted as described in https://docs.python.org/3/reference/expressions.html#generator-expressions * it matches the "@dotted_name(arg_list)" pattern permitted by https://docs.python.org/3/reference/compound_stmts.html#function-definitions ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32012> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com