Message312989
I tried this patch:
diff --git a/Python/ast.c b/Python/ast.c
index e2092f0f85..93be2bc839 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -3537,9 +3537,9 @@ docstring_from_stmts(asdl_seq *stmts)
if (s->kind == Expr_kind && s->v.Expr.value->kind == Str_kind) {
string doc = s->v.Expr.value->v.Str.s;
/* not very efficient, but simple */
- memmove(&asdl_seq_GET(stmts, 0), &asdl_seq_GET(stmts, 1),
- (stmts->size - 1) * sizeof(void*));
- stmts->size--;
+ //memmove(&asdl_seq_GET(stmts, 0), &asdl_seq_GET(stmts, 1),
+ // (stmts->size - 1) * sizeof(void*));
+ //stmts->size--;
return doc;
}
}
But I got "SyntaxError: from __future__ imports must occur at the beginning of the file".
docstring is very special while it looks like just a single string literal statement... |
|
Date |
User |
Action |
Args |
2018-02-27 09:38:04 | methane | set | recipients:
+ methane, georg.brandl, rhettinger, vstinner, benjamin.peterson, ned.deily, Mark.Shannon, serhiy.storchaka |
2018-02-27 09:38:04 | methane | set | messageid: <1519724284.49.0.467229070634.issue32911@psf.upfronthosting.co.za> |
2018-02-27 09:38:04 | methane | link | issue32911 messages |
2018-02-27 09:38:04 | methane | create | |
|