Bug #1722484: remove docstrings again when running with -OO.
(backport from rev. 55732)
This commit is contained in:
parent
b40092bf98
commit
ba871a06fb
|
@ -58,6 +58,8 @@ What's New in Python 2.5.1?
|
||||||
Core and builtins
|
Core and builtins
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
- Bug #1722484: remove docstrings again when running with -OO.
|
||||||
|
|
||||||
- Revert SF #1615701: dict.update() does *not* call __getitem__() or keys()
|
- Revert SF #1615701: dict.update() does *not* call __getitem__() or keys()
|
||||||
if subclassed. This is to remain consistent with 2.5.
|
if subclassed. This is to remain consistent with 2.5.
|
||||||
Also revert revision 53667 with made a similar change to set.update().
|
Also revert revision 53667 with made a similar change to set.update().
|
||||||
|
|
|
@ -1779,7 +1779,8 @@ compiler_body(struct compiler *c, asdl_seq *stmts)
|
||||||
if (!asdl_seq_LEN(stmts))
|
if (!asdl_seq_LEN(stmts))
|
||||||
return 1;
|
return 1;
|
||||||
st = (stmt_ty)asdl_seq_GET(stmts, 0);
|
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;
|
i = 1;
|
||||||
VISIT(c, expr, st->v.Expr.value);
|
VISIT(c, expr, st->v.Expr.value);
|
||||||
if (!compiler_nameop(c, __doc__, Store))
|
if (!compiler_nameop(c, __doc__, Store))
|
||||||
|
|
Loading…
Reference in New Issue