mirror of
https://github.com/python/cpython.git
synced 2025-07-28 05:34:31 +00:00
Fix #1169: remove docstrings in functions for -OO.
This commit is contained in:
parent
111c0ea34a
commit
5a5bc7b10d
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue