Raghuram Devarakonda added the comment: > Stefan Sonnenberg-Carstens added the comment: > > > As per the document and my simple test (on Linux), os.putenv() does > > not update os.environ. I think, it should update it. > What would be the benefit ?
Symmetrical behaviour. When os.getenv() returns the value from os.environ, one would expect, os.putenv to store the value there (At least, I did). On the other hand, it is also ok for both os.getenv and os.putenv get/set the environment directly instead of going through os.environ. I am sure there was some reason for the current behaviour of os.putenv. Perhaps, because putenv is supposedly not available on all platforms? Any way, I think the OP was asking to always "get" the value dynamically when ever os.environ['VAR'] or os.getenv['VAR'] is done. I don't see any problem with that approach. How ever, if it is considered backwards incompatible, I guess an optional parameter can be added to os.getenv. __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1159> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com