MCPcopy Index your code
hub / github.com/RustPython/RustPython / _split_optional_netmask

Function _split_optional_netmask

Lib/ipaddress.py:156–161  ·  view source on GitHub ↗

Helper to split the netmask and raise AddressValueError if needed

(address)

Source from the content-addressed store, hash-verified

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

Callers 1

_split_addr_prefixMethod · 0.85

Calls 4

strFunction · 0.85
lenFunction · 0.85
AddressValueErrorClass · 0.85
splitMethod · 0.45

Tested by

no test coverage detected