Kaydet (Commit) 90145604 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Make sure the UserDict copies do not share the same underlying

dictionary as the original.  This parallels MvL's change to
Lib/os.py 1.56.

Backport candidate.
üst 435f6485
......@@ -22,7 +22,7 @@ class UserDict:
def clear(self): self.data.clear()
def copy(self):
if self.__class__ is UserDict:
return UserDict(self.data)
return UserDict(self.data.copy())
import copy
data = self.data
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment