summaryrefslogtreecommitdiff
path: root/Lib/os.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/os.py')
-rw-r--r--Lib/os.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/os.py b/Lib/os.py
index 16d0af9240..2776cd7c67 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -162,8 +162,13 @@ else:
def __init__(self, environ):
UserDict.UserDict.__init__(self)
self.data = environ
+ def __getinitargs__(self):
+ import copy
+ return (copy.copy(self.data),)
def __setitem__(self, key, item):
putenv(key, item)
self.data[key] = item
+ def __copy__(self):
+ return _Environ(self.data.copy())
environ = _Environ(environ)