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

Function _split_optional_netmask

Lib/ipaddress.py:153–158  ·  view source on GitHub ↗

Helper to split the netmask and raise AddressValueError if needed

(address)

Source from the content-addressed store, hash-verified

151
152
153def _split_optional_netmask(address):
154 """Helper to split the netmask and raise AddressValueError if needed"""
155 addr = str(address).split('/')
156 if len(addr) > 2:
157 raise AddressValueError(f"Only one '/' permitted in {address!r}")
158 return addr
159
160
161def _find_address_range(addresses):

Callers 1

_split_addr_prefixMethod · 0.85

Calls 3

strFunction · 0.85
AddressValueErrorClass · 0.85
splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…