[issue32911] Doc strings omitted from AST

Mark Shannon report at bugs.python.org
Fri Feb 23 05:16:55 EST 2018


Mark Shannon <mark at hotpy.org> added the comment:

Serhiy, thanks for reopening this issue.

It seems to be that there are three reasonable choices:
1. Revert to 3.6 behaviour, with the addition of `docstring` attribute.
2. Change the docstring attribute to an AST node, possibly by modifying the grammar.
3. Do nothing.

I would prefer 1, as it requires no changes to 3rd party code and doesn't present an additional obstacle when porting from Python 2.

2 would be acceptable, as it allows tools to easily convert the body back to its 3.6 form (or vice-versa)

3 is a pain as it involves re-tokenizing the file to get the location of the doc-string.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32911>
_______________________________________


More information about the Python-bugs-list mailing list