diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2002-05-02 17:39:19 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2002-05-02 17:39:19 (GMT) |
commit | a066f46b9b78fb29bc5ac428e1d063d61f472dba (patch) | |
tree | 6d760d7feb3dc460844b2ebd30767172b634edef /Lib/os.py | |
parent | e0e890a4da559895149250786a6bba3e7498304e (diff) | |
download | cpython-a066f46b9b78fb29bc5ac428e1d063d61f472dba.zip cpython-a066f46b9b78fb29bc5ac428e1d063d61f472dba.tar.gz cpython-a066f46b9b78fb29bc5ac428e1d063d61f472dba.tar.bz2 |
Patch 550804: Make os.environ.copy() return a copy.
Diffstat (limited to 'Lib/os.py')
-rw-r--r-- | Lib/os.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -412,6 +412,8 @@ else: def update(self, dict): for k, v in dict.items(): self[k] = v + def copy(self): + return dict(self) else: # Where Env Var Names Can Be Mixed Case class _Environ(UserDict.UserDict): @@ -432,6 +434,8 @@ else: def __delitem__(self, key): unsetenv(key) del self.data[key] + def copy(self): + return dict(self) environ = _Environ(environ) |