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 terry.reedy
Recipients docs@python, jayanthkoushik, mwilliamson, terry.reedy
Date 2014-08-23.17:36:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1408815396.07.0.666183065883.issue22243@psf.upfronthosting.co.za>
In-reply-to
Content
The grammar presented in the doc is intentionally slightly simplified from the one actually used by the LL(1) parser.  The parser has to know what type of statement it is parsing after the first token or so, so it needs a separate production (concept) for statements that start with '@'.  Human readers are more capable and can look backwards from 'def' and 'class'.

A separate section on 'Decorated statements' would be possible, but not necessarily better. A section of 'Decorators' (without calling them 'statements') would be slightly different and also possible.  Discussion would have to start on Python ideas and any action a separate issue.
History
Date User Action Args
2014-08-23 17:36:36terry.reedysetrecipients: + terry.reedy, docs@python, jayanthkoushik, mwilliamson
2014-08-23 17:36:36terry.reedysetmessageid: <1408815396.07.0.666183065883.issue22243@psf.upfronthosting.co.za>
2014-08-23 17:36:36terry.reedylinkissue22243 messages
2014-08-23 17:36:35terry.reedycreate