[issue9583] Document startup option/environment interaction

2012-10-17 Thread Andrew Svetlov
Andrew Svetlov added the comment: Close the issue. Feel free to reopen if clarification needed. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___

[issue9583] Document startup option/environment interaction

2012-10-17 Thread Andrew Svetlov
Andrew Svetlov added the comment: Applied patch. Thanks, Todd. I think the issue can be closed. -- nosy: +asvetlov versions: +Python 3.2, Python 3.3 ___ Python tracker ___ ___

[issue9583] Document startup option/environment interaction

2012-10-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2f812212599b by Andrew Svetlov in branch '2.7': Issue #9583: Document startup option/environment interaction. http://hg.python.org/cpython/rev/2f812212599b New changeset a8052ad9752b by Andrew Svetlov in branch '3.2': Issue #9583: Document startup o

[issue9583] Document startup option/environment interaction

2012-10-15 Thread Todd Rovito
Todd Rovito added the comment: After another review I decided to submit a newer patch that uses a comma so I think the documentation flows better. -- type: -> enhancement Added file: http://bugs.python.org/file27590/EnvironmentVariables.patch ___ Py

[issue9583] Document startup option/environment interaction

2012-10-15 Thread Todd Rovito
Todd Rovito added the comment: Applies to Python 3.4 in development and Python 2.7. I recently ran into a similar conflict where I was overriding a environment variable with a command line option and didn't realize it. I first checked the documentation and noticed that it was not clear. The

[issue9583] Document startup option/environment interaction

2010-09-20 Thread Buck Golemon
Buck Golemon added the comment: The file is here: http://svn.python.org/view/python/trunk/Python/pythonrun.c?view=markup The second if statement is doing exactly what I find troubling: set the flag even if the incoming value is 0. I guess this is to handle the empty string case, such as: s

[issue9583] Document startup option/environment interaction

2010-09-20 Thread Buck Golemon
Buck Golemon added the comment: "that number of times" isn't exactly accurate either, since "0" is effectively interpreted as "1". This change would only adversely affect people who use no -O option, set PYTHONOPTIMIZE to '0', and need optimization. I feel like that falls into the realm of ve

[issue9583] Document startup option/environment interaction

2010-09-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: I do not deny that the behavior described in the doc is a bit strange (keying off of type, ignoring value) is a bit bizarre and contrary to reasonable expectation based on other programs. But to alter behavior before 3.2 or later would require a clearly demon

[issue9583] Document startup option/environment interaction

2010-09-20 Thread R. David Murray
R. David Murray added the comment: I understood the documentation snippet Terry quoted as saying exactly what you say the code does. The doc could be clearer by replacing "multiple times" with "that number of times". Not that more than two has any meaning currently... Changing the behavior

[issue9583] Document startup option/environment interaction

2010-09-20 Thread Buck Golemon
Buck Golemon added the comment: If I understand this code, it means that PYTHONOPTIMIZE set to 1 or 2 works as expected, but set to 0, gives a flag value of 1. static int add_flag(int flag, const char *envs) { int env = atoi(envs); if (flag < env) flag = env;

[issue9583] Document startup option/environment interaction

2010-09-20 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- assignee: -> d...@python components: +Documentation -Interpreter Core nosy: +d...@python title: PYTHONOPTIMIZE = 0 is not honored -> Document startup option/environment interaction type: behavior -> ___ Python tracker