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

Method __add__

Lib/ipaddress.py:588–591  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

586 # Shorthand for Integer addition and subtraction. This is not
587 # meant to ever support addition/subtraction of addresses.
588 def __add__(self, other):
589 if not isinstance(other, int):
590 return NotImplemented
591 return self.__class__(int(self) + other)
592
593 def __sub__(self, other):
594 if not isinstance(other, int):

Callers

nothing calls this directly

Calls 1

__class__Method · 0.45

Tested by

no test coverage detected