Nick Coghlan <ncogh...@gmail.com> added the comment:

Ouch, I'd completely missed the fact that this would affect the parsing of bare 
strings to a simple AST (I was focused on functions and classes, as in Mark's 
original example).

So even though I'm the author of https://bugs.python.org/issue11549#msg193656 
(where I note that we consider it reasonable for AST manipulation code to 
require updates when going between major Python versions), I'm reluctantly 
voting "B", since there's a difference between "some AST manipulation code will 
need to change to account for new node types and arrangements" and "all code 
calling ast.parse with the default mode and processing the top level node will 
need to change to account for docstrings now being omitted from the module 
body, with no readily available quick fix to get the old behaviour back".

(Note that in voting for option B, I'm really only objecting to the change when 
it comes to Module AST nodes - rather than full reversion, I'd also be OK with 
a change that duplicated the new docstring attribute as body[0] for modules, 
while continuing to eliminate the redundancy for functions and classes - this 
would be a more selective variant of Mark's "Option 1" proposal from back in 
February).

----------
nosy: +ncoghlan

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32911>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to