MCPcopy Index your code
hub / github.com/python/cpython / copy

Method copy

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

Source from the content-addressed store, hash-verified

1242 return inst
1243
1244 def copy(self):
1245 if self.__class__ is UserDict:
1246 return UserDict(self.data.copy())
1247 data = self.data
1248 try:
1249 self.data = {}
1250 c = _copy(self)
1251 finally:
1252 self.data = data
1253 c.update(self)
1254 return c
1255
1256 @classmethod
1257 def fromkeys(cls, iterable, value=None):

Callers 1

test_allMethod · 0.95

Calls 4

UserDictClass · 0.85
_copyFunction · 0.85
copyMethod · 0.45
updateMethod · 0.45

Tested by 1

test_allMethod · 0.76