[Python-checkins] r55733 - in python/branches/release25-maint: Misc/NEWS Python/compile.c
georg.brandl
python-checkins at python.org
Fri Jun 1 13:33:47 CEST 2007
Author: georg.brandl
Date: Fri Jun 1 13:33:45 2007
New Revision: 55733
Modified:
python/branches/release25-maint/Misc/NEWS
python/branches/release25-maint/Python/compile.c
Log:
Bug #1722484: remove docstrings again when running with -OO.
(backport from rev. 55732)
Modified: python/branches/release25-maint/Misc/NEWS
==============================================================================
--- python/branches/release25-maint/Misc/NEWS (original)
+++ python/branches/release25-maint/Misc/NEWS Fri Jun 1 13:33:45 2007
@@ -58,6 +58,8 @@
Core and builtins
-----------------
+- Bug #1722484: remove docstrings again when running with -OO.
+
- Revert SF #1615701: dict.update() does *not* call __getitem__() or keys()
if subclassed. This is to remain consistent with 2.5.
Also revert revision 53667 with made a similar change to set.update().
Modified: python/branches/release25-maint/Python/compile.c
==============================================================================
--- python/branches/release25-maint/Python/compile.c (original)
+++ python/branches/release25-maint/Python/compile.c Fri Jun 1 13:33:45 2007
@@ -1779,7 +1779,8 @@
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))
More information about the Python-checkins
mailing list