diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2024-09-13 14:06:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-13 14:06:06 (GMT) |
commit | a9594a34c62487961be86c0925daaa43bb467bb9 (patch) | |
tree | e7674482ca96b3e045ab3d5d9a7e56bbba5da0f0 /Python/compile.c | |
parent | cfe6074d1fa81cf0684fbf8a623616441a1966e7 (diff) | |
download | cpython-a9594a34c62487961be86c0925daaa43bb467bb9.zip cpython-a9594a34c62487961be86c0925daaa43bb467bb9.tar.gz cpython-a9594a34c62487961be86c0925daaa43bb467bb9.tar.bz2 |
gh-124022: Fix bug where class docstring is removed in interactive mode (#124023)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/compile.c b/Python/compile.c index d54c320..e1d2c30 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -790,13 +790,13 @@ compiler_codegen(compiler *c, mod_ty mod) switch (mod->kind) { case Module_kind: { asdl_stmt_seq *stmts = mod->v.Module.body; - RETURN_IF_ERROR(_PyCodegen_Body(c, start_location(stmts), stmts)); + RETURN_IF_ERROR(_PyCodegen_Body(c, start_location(stmts), stmts, false)); break; } case Interactive_kind: { c->c_interactive = 1; asdl_stmt_seq *stmts = mod->v.Interactive.body; - RETURN_IF_ERROR(_PyCodegen_Body(c, start_location(stmts), stmts)); + RETURN_IF_ERROR(_PyCodegen_Body(c, start_location(stmts), stmts, true)); break; } case Expression_kind: { |