Message281906
In Windows, python's os.environ currently handles the case sensitivity different that the OS. While it's true that the OS is case insensitive, it does preserve the case that you first set it as.
For example:
C:\Users\user>set aSD=Blah
C:\Users\user>set asd
aSD=Blah
But in python:
>>> import os
>>> 'aSD' in os.environ.keys()
False
Today as more people pass environment variables to processes, it's better to behave as the OS does. Basically I think that os.environ (both in 2.7 and 3) should preserve the case as well (for when you need to access / iterate over the keys or set a key), but ignore it when you get a key.
https://github.com/python/cpython/blob/b82a5a65caa5b0f0efccaf2bbea94f1eba19a54d/Lib/os.py#L733 |
|
Date |
User |
Action |
Args |
2016-11-28 18:55:46 | tzickel | set | recipients:
+ tzickel, loewis, paul.moore, larry, tim.golden, zach.ware, steve.dower |
2016-11-28 18:55:46 | tzickel | set | messageid: <1480359346.4.0.287394822331.issue28824@psf.upfronthosting.co.za> |
2016-11-28 18:55:46 | tzickel | link | issue28824 messages |
2016-11-28 18:55:46 | tzickel | create | |
|