[issue32911] Doc strings no longer stored in body of AST

INADA Naoki report at bugs.python.org
Fri Apr 13 00:58:10 EDT 2018


INADA Naoki <songofacandy at gmail.com> added the comment:

> in practice `ast.parse()` is often used with smaller fragments of source code that don't directly correspond to a complete module, and this behaviour makes no sense in such cases.
>
> The resulting bug in kdev-python took a while to track down (because I had no immediate reason to suspect this change), and will be somewhat awkward to workaround.

Would you elaborate it more, please?
Without concrete example, we cannot to decide how it's important problem.

> I would prefer that this be reverted; it's likely to break a variety of users in strange ways.

I don't want to revert, see discussions in this issue and PR-5927.

And would you give us real world example of "variety of users"?
How many applications use ast.parse for such way?

----------

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


More information about the Python-bugs-list mailing list