summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-05-29 09:04:55 (GMT)
committerGitHub <noreply@github.com>2018-05-29 09:04:55 (GMT)
commit73cbe7a01a22d02dbe1ec841e8779c775cad3d08 (patch)
tree0c39a8adb1cebdfc95cc991223c6c278fb13100a /Tools
parent2179022d94937d7b0600b0dc192ca6fa5f53d830 (diff)
downloadcpython-73cbe7a01a22d02dbe1ec841e8779c775cad3d08.zip
cpython-73cbe7a01a22d02dbe1ec841e8779c775cad3d08.tar.gz
cpython-73cbe7a01a22d02dbe1ec841e8779c775cad3d08.tar.bz2
bpo-32911: Revert bpo-29463. (GH-7121) (GH-7197)
Remove the docstring attribute of AST types and restore docstring expression as a first stmt in their body. Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
Diffstat (limited to 'Tools')
-rw-r--r--Tools/parser/unparse.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/Tools/parser/unparse.py b/Tools/parser/unparse.py
index 3eb6310..7e1cc4e 100644
--- a/Tools/parser/unparse.py
+++ b/Tools/parser/unparse.py
@@ -71,8 +71,6 @@ class Unparser:
########################################################
def _Module(self, tree):
- if tree.docstring is not None:
- self.fill(repr(tree.docstring))
for stmt in tree.body:
self.dispatch(stmt)
@@ -237,8 +235,6 @@ class Unparser:
self.write(")")
self.enter()
- if t.docstring is not None:
- self.fill(repr(t.docstring))
self.dispatch(t.body)
self.leave()
@@ -261,8 +257,6 @@ class Unparser:
self.write(" -> ")
self.dispatch(t.returns)
self.enter()
- if t.docstring is not None:
- self.fill(repr(t.docstring))
self.dispatch(t.body)
self.leave()