Mercurial > cpython-lru_cache-weakref
diff Python/compile.c @ 43402:8e13d3eacacc legacy-trunk
Fix #1169: remove docstrings in functions for -OO.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Wed, 19 Sep 2007 06:37:19 +0000 |
| parents | 22bbafa6933b |
| children | 07aa19170a67 |
line wrap: on
line diff
--- a/Python/compile.c Tue Sep 18 23:34:44 2007 +0000 +++ b/Python/compile.c Wed Sep 19 06:37:19 2007 +0000 @@ -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);
