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

Method __copy__

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

Source from the content-addressed store, hash-verified

1194 return self
1195
1196 def __copy__(self):
1197 inst = self.__class__.__new__(self.__class__)
1198 inst.__dict__.update(self.__dict__)
1199 # Create a copy and avoid triggering descriptors
1200 inst.__dict__["data"] = self.__dict__["data"].copy()
1201 return inst
1202
1203 def copy(self):
1204 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