diff options
author | Georg Brandl <georg@python.org> | 2007-09-19 06:37:19 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-09-19 06:37:19 (GMT) |
commit | 5a5bc7b10d679368cfa66e77b7b4ba7068bc190d (patch) | |
tree | d82f2f8a604fd63bbd31cd8a6538ec69e90ef88a /Python/compile.c | |
parent | 111c0ea34a3308a99589704f6f156185d192b5f4 (diff) | |
download | cpython-5a5bc7b10d679368cfa66e77b7b4ba7068bc190d.zip cpython-5a5bc7b10d679368cfa66e77b7b4ba7068bc190d.tar.gz cpython-5a5bc7b10d679368cfa66e77b7b4ba7068bc190d.tar.bz2 |
Fix #1169: remove docstrings in functions for -OO.
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ 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); |