homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author methane
Recipients Mark.Shannon, benjamin.peterson, georg.brandl, methane, ned.deily, rhettinger, serhiy.storchaka, vstinner
Date 2018年02月27日.09:38:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1519724284.49.0.467229070634.issue32911@psf.upfronthosting.co.za>
In-reply-to
Content
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...
History
Date User Action Args
2018年02月27日 09:38:04methanesetrecipients: + methane, georg.brandl, rhettinger, vstinner, benjamin.peterson, ned.deily, Mark.Shannon, serhiy.storchaka
2018年02月27日 09:38:04methanesetmessageid: <1519724284.49.0.467229070634.issue32911@psf.upfronthosting.co.za>
2018年02月27日 09:38:04methanelinkissue32911 messages
2018年02月27日 09:38:04methanecreate

AltStyle によって変換されたページ (->オリジナル) /