summaryrefslogtreecommitdiffstats
path: root/Parser/Python.asdl
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 /Parser/Python.asdl
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 'Parser/Python.asdl')
-rw-r--r--Parser/Python.asdl11
1 files changed, 4 insertions, 7 deletions
diff --git a/Parser/Python.asdl b/Parser/Python.asdl
index 526cffb..f470ad1 100644
--- a/Parser/Python.asdl
+++ b/Parser/Python.asdl
@@ -6,7 +6,7 @@
module Python
{
- mod = Module(stmt* body, string? docstring)
+ mod = Module(stmt* body)
| Interactive(stmt* body)
| Expression(expr body)
@@ -14,18 +14,15 @@ module Python
| Suite(stmt* body)
stmt = FunctionDef(identifier name, arguments args,
- stmt* body, expr* decorator_list, expr? returns,
- string? docstring)
+ stmt* body, expr* decorator_list, expr? returns)
| AsyncFunctionDef(identifier name, arguments args,
- stmt* body, expr* decorator_list, expr? returns,
- string? docstring)
+ stmt* body, expr* decorator_list, expr? returns)
| ClassDef(identifier name,
expr* bases,
keyword* keywords,
stmt* body,
- expr* decorator_list,
- string? docstring)
+ expr* decorator_list)
| Return(expr? value)
| Delete(expr* targets)