mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
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>
This commit is contained in:
parent
2179022d94
commit
73cbe7a01a
17 changed files with 3287 additions and 3358 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue