MCPcopy Index your code
hub / github.com/secdev/scapy / do_copy

Method do_copy

scapy/fields.py:262–272  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

260 return s[self.sz:], self.m2i(pkt, self.struct.unpack(s[:self.sz])[0])
261
262 def do_copy(self, x):
263 # type: (I) -> I
264 if isinstance(x, list):
265 x = x[:] # type: ignore
266 for i in range(len(x)):
267 if isinstance(x[i], BasePacket):
268 x[i] = x[i].copy()
269 return x # type: ignore
270 if hasattr(x, "copy"):
271 return x.copy() # type: ignore
272 return x
273
274 def __repr__(self):
275 # type: () -> str

Callers 2

copy_field_valueMethod · 0.45

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected