MCPcopy Index your code
hub / github.com/RustPython/RustPython / copy

Method copy

Lib/collections/__init__.py:1203–1214  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1201 return inst
1202
1203 def copy(self):
1204 if self.__class__ is UserDict:
1205 return UserDict(self.data.copy())
1206 import copy
1207 data = self.data
1208 try:
1209 self.data = {}
1210 c = copy.copy(self)
1211 finally:
1212 self.data = data
1213 c.update(self)
1214 return c
1215
1216 @classmethod
1217 def fromkeys(cls, iterable, value=None):

Callers 1

test_allMethod · 0.95

Calls 3

UserDictClass · 0.85
copyMethod · 0.45
updateMethod · 0.45

Tested by 1

test_allMethod · 0.76