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

Method _check_int_address

Lib/ipaddress.py:407–414  ·  view source on GitHub ↗
(self, address)

Source from the content-addressed store, hash-verified

405 return self._reverse_pointer()
406
407 def _check_int_address(self, address):
408 if address < 0:
409 msg = "%d (< 0) is not permitted as an IPv%d address"
410 raise AddressValueError(msg % (address, self.version))
411 if address > self._ALL_ONES:
412 msg = "%d (>= 2**%d) is not permitted as an IPv%d address"
413 raise AddressValueError(msg % (address, self.max_prefixlen,
414 self.version))
415
416 def _check_packed_address(self, address, expected_len):
417 address_len = len(address)

Callers 2

__init__Method · 0.80
__init__Method · 0.80

Calls 1

AddressValueErrorClass · 0.85

Tested by

no test coverage detected