mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
The case-insensitive _Environ class was lacking a case-insensitive has_key().
This commit is contained in:
parent
4437fdf265
commit
b46413f274
1 changed files with 2 additions and 0 deletions
|
@ -245,6 +245,8 @@ else:
|
||||||
self.data[key] = item
|
self.data[key] = item
|
||||||
def __getitem__(self, key):
|
def __getitem__(self, key):
|
||||||
return self.data[string.upper(key)]
|
return self.data[string.upper(key)]
|
||||||
|
def has_key(self, key):
|
||||||
|
return self.data.has_key(string.upper(key))
|
||||||
|
|
||||||
else: # Where Env Var Names Can Be Mixed Case
|
else: # Where Env Var Names Can Be Mixed Case
|
||||||
class _Environ(UserDict.UserDict):
|
class _Environ(UserDict.UserDict):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue