Skip to content

bpo-33691: Add _PyAST_GetDocString().#7236

Merged
serhiy-storchaka merged 1 commit intopython:masterfrom
serhiy-storchaka:ast-docstring-refactor
May 30, 2018
Merged

bpo-33691: Add _PyAST_GetDocString().#7236
serhiy-storchaka merged 1 commit intopython:masterfrom
serhiy-storchaka:ast-docstring-refactor

Conversation

@serhiy-storchaka
Copy link
Copy Markdown
Member

@serhiy-storchaka serhiy-storchaka commented May 30, 2018

Comment thread Python/compile.c
i = 1;
st = (stmt_ty)asdl_seq_GET(stmts, 0);
assert(st->kind == Expr_kind);
VISIT(c, expr, st->v.Expr.value);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VISIT(c, expr, st->v.Expr.value) is used instead of simple ADDOP_LOAD_CONST(c, docstring) because the former sets lineno.

@serhiy-storchaka serhiy-storchaka merged commit 143ce5c into python:master May 30, 2018
@serhiy-storchaka serhiy-storchaka deleted the ast-docstring-refactor branch May 30, 2018 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants