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

Method __repr__

scapy/base_classes.py:270–287  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

268 )
269
270 def __repr__(self):
271 # type: () -> str
272 scope_id_repr = ""
273 if self.scope:
274 scope_id_repr = ", scope=%s" % repr(self.scope)
275 if self.mask is not None:
276 return '%s("%s/%d"%s)' % (
277 self.__class__.__name__,
278 self.net,
279 self.mask,
280 scope_id_repr,
281 )
282 return '%s("%s", "%s"%s)' % (
283 self.__class__.__name__,
284 self.int2ip(self.start),
285 self.int2ip(self.stop),
286 scope_id_repr,
287 )
288
289 def __eq__(self, other):
290 # type: (Any) -> bool

Callers 1

__repr__Method · 0.45

Calls 1

int2ipMethod · 0.95

Tested by

no test coverage detected