[issue32911] Doc strings no longer stored in body of AST
Ned Deily
report at bugs.python.org
Thu May 24 23:38:07 EDT 2018
Ned Deily <nad at python.org> added the comment:
For the record, Serhiy commented on this issue today in a thread on the python-committers list:
"I have doubts about two issues. I feel the responsibility for them because I had the opportunity to solve them before, but I lost it.
1. Changes in the AST. Few third-party projects was broken by it and already are fixed. I suppose yet few projects will be changed after 3.7 be released. It is interesting that IPython was broken in different way than other projects. It was needed to reintroduce the docstring in the list of statements, effectively reverting the 3.7 change. IPython allows to enter several statements at prompt, and therefore it compiles them with the 'exec' mode instead of 'single' as the CPython REPL and IDLE shell. Currently CPython doesn't allow you to paste arbitrary script like the following:
if a:
b
if c:
d
You need to add an empty line between top-level complex statements. If one time CPython will add support of pasting several statements without empty lines between, it might need to add the same hack as IPython. I afraid that we might be needed to change AST again, in 3.7.1 or in 3.8.0."
And later:
"Inada's patch looked complex (actually it mostly restored the code before his previous change). We didn't know about IPython and we decided that it is not worth to change this code at this stage (after beta2). And definitely it will be later to do this after rc1."
Full context/content starting here:
https://mail.python.org/pipermail/python-committers/2018-May/005467.html
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32911>
_______________________________________
More information about the Python-bugs-list
mailing list