[docs] [issue9583] Document startup option/environment interaction
Buck Golemon
report at bugs.python.org
Tue Sep 21 02:07:23 CEST 2010
Buck Golemon <buck.golemon at amd.com> 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;
if (flag < 1)
flag = 1;
return flag;
}
Read literally, the man page indicates that any integer value will give a flag value of 2.
I agree my shell script is probably unusual, but I believe setting this environment value to zero and expecting the feature to be off (given no contradicting options) is reasonable.
I petition to remove the second if statement above (environment value of "0" yields no flag).
I'd also love to provide a numeric argument to -O, to dynamically set this value more readily, but that is lower importance.
I can implement these and run the unit tests if required.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9583>
_______________________________________
More information about the docs
mailing list