On this page
ipaddress.NetmaskValueError
Prev: ipaddress.IPv6Network | Up: ipaddress | Next: ipaddress.summarize_address_range
Rel: ipaddress.AddressValueError, ipaddress.collapse_addresses, ipaddress.get_mixed_type_key, ipaddress.ip_address
Ref: docs.python.org โ ipaddress.NetmaskValueError
Tags: #public #python3 #stdlib #ipaddress
Import
import ipaddress
from ipaddress import NetmaskValueError
Signature & Overview
ipaddress.NetmaskValueError(...)
A Value Error related to the netmask.
Methods & Attributes
NetmaskValueError.add_note(self, note, /)โ Add a note to the exceptionNetmaskValueError.with_traceback(self, tb, /)โ Set self.traceback to tb and return self.
Usage
import ipaddress
try:
ipaddress.IPv4Network("10.0.0.0/33")
except ipaddress.NetmaskValueError:
assert issubclass(ipaddress.NetmaskValueError, ValueError)
Gotchas
- Subclass of
ValueError: Raised on invalid prefix lengths or netmasks.
REPL Inspect
from ipaddress import NetmaskValueError
help(NetmaskValueError)
Linked from
Related notes
- tuts/python3/stdlib_module/ipaddress/IPv6Network Linked here; links to this page; shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/summarize_address_range Linked here; links to this page; shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/ipaddress/AddressValueError Linked here; shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/collapse_addresses Linked here; shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/get_mixed_type_key Linked here; shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/ip_address Linked here; shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/ip_interface shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/ip_network shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/IPv4Address shared tags: #ipaddress, #stdlib