]> granicus.if.org Git - python/commitdiff
The case-insensitive _Environ class was lacking a case-insensitive has_key().
authorGuido van Rossum <guido@python.org>
Mon, 3 May 1999 15:23:24 +0000 (15:23 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 3 May 1999 15:23:24 +0000 (15:23 +0000)
Lib/os.py

index a4d07c932f161865a6b18b7fbd65dbb2fb6fc858..d4cfff987e76e22a55426a2fdf567418b106897f 100644 (file)
--- 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):