The case-insensitive _Environ class was lacking a case-insensitive has_key().

This commit is contained in:
Guido van Rossum 1999-05-03 15:23:24 +00:00
parent 4437fdf265
commit b46413f274
1 changed files with 2 additions and 0 deletions

View File

@ -245,6 +245,8 @@ else:
self.data[key] = item
def __getitem__(self, 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
class _Environ(UserDict.UserDict):