[issue29463] Add `docstring` attribute to AST nodes

INADA Naoki report at bugs.python.org
Wed Feb 8 16:56:37 EST 2017


INADA Naoki added the comment:

So what's new entry may be:

+* ``Module``, ``FunctionDef``, ``AsyncFunctionDef``, and
+  ``ClassDef`` AST nodes now have a new ``docstring`` attribute.
+  The first statement in their body is not considered as a docstring anymore.
+  This affects ``co_firstlineno`` and ``co_lnotab`` attribute of code object
+  for module and class.
+  (Contributed by Eugene Toder and INADA Naoki in :issue:`29463`.)
+

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29463>
_______________________________________


More information about the Python-bugs-list mailing list