Buck Golemon <[email protected]> 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 <[email protected]>
<http://bugs.python.org/issue9583>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com