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

Method __copy__

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

Source from the content-addressed store, hash-verified

1311 return self
1312
1313 def __copy__(self):
1314 inst = self.__class__.__new__(self.__class__)
1315 inst.__dict__.update(self.__dict__)
1316 # Create a copy and avoid triggering descriptors
1317 inst.__dict__["data"] = self.__dict__["data"][:]
1318 return inst
1319
1320 def append(self, item):
1321 self.data.append(item)

Callers

nothing calls this directly

Calls 2

__new__Method · 0.45
updateMethod · 0.45

Tested by

no test coverage detected