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 Eric.Wieser
Recipients Eric.Wieser, docs@python
Date 2016-05-16.22:12:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463436725.68.0.177476383596.issue27042@psf.upfronthosting.co.za>
In-reply-to
Content
https://docs.python.org/3.2/reference/compound_stmts.html#function-definitions 

and onwards say the following

    decorator      ::=  "@" dotted_name ["(" [parameter_list [","]] ")"] NEWLINE

This is a regression from the 2.7 docs, which correctly said

    decorator      ::=  "@" dotted_name ["(" [argument_list [","]] ")"] NEWLINE

The implication is that the following is supposedly valid in python 3:

    @deco(what : "is this" = "supposed to mean")
    def foo(annotations: "are only for here" = "right?"):
        pass

The interpreter disagrees with the docs, and correctly rejects this syntax as garbage
History
Date User Action Args
2016-05-16 22:12:05Eric.Wiesersetrecipients: + Eric.Wieser, docs@python
2016-05-16 22:12:05Eric.Wiesersetmessageid: <1463436725.68.0.177476383596.issue27042@psf.upfronthosting.co.za>
2016-05-16 22:12:05Eric.Wieserlinkissue27042 messages
2016-05-16 22:12:05Eric.Wiesercreate