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

Method __copy__

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

Source from the content-addressed store, hash-verified

1351 return self
1352
1353 def __copy__(self):
1354 inst = self.__class__.__new__(self.__class__)
1355 inst.__dict__.update(self.__dict__)
1356 # Create a copy and avoid triggering descriptors
1357 inst.__dict__["data"] = self.__dict__["data"][:]
1358 return inst
1359
1360 def append(self, item):
1361 self.data.append(item)

Callers

nothing calls this directly

Calls 2

__new__Method · 0.45
updateMethod · 0.45

Tested by

no test coverage detected