summaryrefslogtreecommitdiff
path: root/Parser
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-05-29 10:49:10 +0300
committerGitHub <noreply@github.com>2018-05-29 10:49:10 +0300
commit2641ee5040abb090e66e4ff80c33b76729b36e75 (patch)
tree8f37d0577e1fb981b1fb0ce97b79f3c75446cffd /Parser
parenteca085993cb8620ba9232560f46d91326a13cdd2 (diff)
downloadcpython-git-2641ee5040abb090e66e4ff80c33b76729b36e75.tar.gz
bpo-32911: Revert bpo-29463. (GH-7121)
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')
-rw-r--r--Parser/Python.asdl11
1 files changed, 4 insertions, 7 deletions
diff --git a/Parser/Python.asdl b/Parser/Python.asdl
index 526cffbce0..f470ad13b6 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)