[Python-bugs-list] [Bug #111165] doc-string removal masked by PYTHONOPTIMIZE

noreply@sourceforge.net noreply@sourceforge.net
Fri, 25 Aug 2000 13:41:36 -0700


Bug #111165, was updated on 2000-Aug-05 15:21
Here is a current snapshot of the bug.

Project: Python
Category: Parser/Compiler
Status: Open
Resolution: None
Bug Group: None
Priority: 7
Summary: doc-string removal masked by PYTHONOPTIMIZE

Details: If Python is started with
  PYTHON -OO
but the PYTHONOPTIMIZE environment variable is defined,
then Py_OptimizeFlag is set back to 1 in pythonrun.c:
    if ((p = getenv("PYTHONOPTIMIZE")) && *p != '\0')
        Py_OptimizeFlag = 1;
so doc-strings continue to be generated (compile.c line 2691):
get_docstring(n)
    node *n;
{
    /* Don't generate doc-strings if run with -OO */
    if (Py_OptimizeFlag > 1)
        return NULL;


For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111165&group_id=5470