mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
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.
This commit is contained in:
parent
435f648584
commit
9014560412
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue