This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients bukzor, terry.reedy
Date 2010-09-20.23:39:44
SpamBayes Score 1.11022e-16
Marked as misclassified No
Message-id <>
I am following the suggestion in the last sentence of the original post and turning this into a doc issue. I believe it is standard that command-line switches override environmental variables when there is a conflict, but 'Using Python', section 1.2. 'Environment variables' could gain a sentence that says so, or whatever the case is. If I am correct, "These environment variables influence Python’s behavior." could be followed by "They are processed *before* the command-line switches other than -E."

As I read the doc, PYTHONOPTIMIZE = 0, does not seem to mean to the interpreter what you expect it to. "PYTHONOPTIMIZE  If this is set to a non-empty string it is equivalent to specifying the -O option. If set to an integer, it is equivalent to specifying -O multiple times." (which is to say, equivalent to -OO.) But the doc could be misleading. You can check the source if you wish.

In general there are lots of switches to alter defaults and turn things on but none to restore defaults and turn things off. The one exception is "-E  Ignore all PYTHON* environment variables, e.g. PYTHONPATH and PYTHONHOME, that might be set." The obvious intent is to start fresh and only specify what one wants. I do not think one idiosyncratic wrapper is sufficient reason to add one or more other off switches. There are already about 20 options. If you do not want something turned on, do not turn it on.
Date User Action Args
2010-09-20 23:39:49terry.reedysetrecipients: + terry.reedy, bukzor
2010-09-20 23:39:48terry.reedysetmessageid: <>
2010-09-20 23:39:45terry.reedylinkissue9583 messages
2010-09-20 23:39:44terry.reedycreate