[Python-checkins] r58204 - python/trunk/Python/compile.c
georg.brandl
python-checkins at python.org
Wed Sep 19 08:37:19 CEST 2007
Author: georg.brandl
Date: Wed Sep 19 08:37:19 2007
New Revision: 58204
Modified:
python/trunk/Python/compile.c
Log:
Fix #1169: remove docstrings in functions for -OO.
Modified: python/trunk/Python/compile.c
==============================================================================
--- python/trunk/Python/compile.c (original)
+++ python/trunk/Python/compile.c Wed Sep 19 08:37:19 2007
@@ -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);
More information about the Python-checkins
mailing list