From: Guido van Rossum Date: Wed, 23 Jan 2019 19:18:37 +0000 (-0800) Subject: Fix assert in ast_for_suite() -- n can be a func_body_suite too now X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=567f34132194ef45e90aa8b440a5c89bebc84f2c;p=thirdparty%2FPython%2Fcpython.git Fix assert in ast_for_suite() -- n can be a func_body_suite too now --- diff --git a/Python/ast.c b/Python/ast.c index b91c2bbc0462..6aa46e34014a 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -3674,7 +3674,9 @@ ast_for_suite(struct compiling *c, const node *n) int i, total, num, end, pos = 0; node *ch; - REQ(n, suite); + if (TYPE(n) != func_body_suite) { + REQ(n, suite); + } total = num_stmts(n); seq = _Py_asdl_seq_new(total, c->c_arena);