mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Bug #1722484: remove docstrings again when running with -OO.
This commit is contained in:
parent
4a700bb469
commit
a5ea68905a
2 changed files with 4 additions and 1 deletions
|
@ -1119,7 +1119,8 @@ compiler_body(struct compiler *c, asdl_seq *stmts)
|
|||
if (!asdl_seq_LEN(stmts))
|
||||
return 1;
|
||||
st = (stmt_ty)asdl_seq_GET(stmts, 0);
|
||||
if (compiler_isdocstring(st)) {
|
||||
if (compiler_isdocstring(st) && Py_OptimizeFlag < 2) {
|
||||
/* don't generate docstrings if -OO */
|
||||
i = 1;
|
||||
VISIT(c, expr, st->v.Expr.value);
|
||||
if (!compiler_nameop(c, __doc__, Store))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue