[docs] [issue22243] Documentation on try statement incorrectly implies target of except clause can be any assignable expression
Terry J. Reedy
report at bugs.python.org
Sat Aug 23 19:36:36 CEST 2014
Terry J. Reedy added the comment:
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.
Python tracker <report at bugs.python.org>
More information about the docs