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

Method __copy__

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

Source from the content-addressed store, hash-verified

1235 return self
1236
1237 def __copy__(self):
1238 inst = self.__class__.__new__(self.__class__)
1239 inst.__dict__.update(self.__dict__)
1240 # Create a copy and avoid triggering descriptors
1241 inst.__dict__["data"] = self.__dict__["data"].copy()
1242 return inst
1243
1244 def copy(self):
1245 if self.__class__ is UserDict:

Callers

nothing calls this directly

Calls 3

__new__Method · 0.45
updateMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected