From: Guido van Rossum Date: Mon, 3 May 1999 15:23:24 +0000 (+0000) Subject: The case-insensitive _Environ class was lacking a case-insensitive has_key(). X-Git-Tag: v1.6a1~1395 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b46413f274bb53e4a8104adad117f964c0c6ab6d;p=thirdparty%2FPython%2Fcpython.git The case-insensitive _Environ class was lacking a case-insensitive has_key(). --- diff --git a/Lib/os.py b/Lib/os.py index a4d07c932f16..d4cfff987e76 100644 --- a/Lib/os.py +++ b/Lib/os.py @@ -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):