commit | 5a5bc7b10d679368cfa66e77b7b4ba7068bc190d | [log] [tgz] |
---|---|---|
author | Georg Brandl <georg@python.org> | Wed Sep 19 06:37:19 2007 +0000 |
committer | Georg Brandl <georg@python.org> | Wed Sep 19 06:37:19 2007 +0000 |
tree | d82f2f8a604fd63bbd31cd8a6538ec69e90ef88a | |
parent | 111c0ea34a3308a99589704f6f156185d192b5f4 [diff] [blame] |
Fix #1169: remove docstrings in functions for -OO.
diff --git a/Python/compile.c b/Python/compile.c index eed1379..193d520 100644 --- a/Python/compile.c +++ b/Python/compile.c
@@ -1336,7 +1336,7 @@ 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);