From 5a5bc7b10d679368cfa66e77b7b4ba7068bc190d Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Wed, 19 Sep 2007 06:37:19 +0000 Subject: [PATCH] Fix #1169: remove docstrings in functions for -OO. --- Python/compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/compile.c b/Python/compile.c index eed13792d2..193d52076a 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -1336,7 +1336,7 @@ compiler_function(struct compiler *c, stmt_ty s) st = (stmt_ty)asdl_seq_GET(s->v.FunctionDef.body, 0); docstring = compiler_isdocstring(st); - if (docstring) + if (docstring && Py_OptimizeFlag < 2) first_const = st->v.Expr.value->v.Str.s; if (compiler_add_o(c, c->u->u_consts, first_const) < 0) { compiler_exit_scope(c); -- 2.50.1