Kaydet (Commit) 5a5bc7b1 authored tarafından Georg Brandl's avatar Georg Brandl

Fix #1169: remove docstrings in functions for -OO.

üst 111c0ea3
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment