On this page
socket.herror
Prev: socket.has_dualstack_ipv6 | Up: socket | Next: socket.htonl
Rel: socket.AddressFamily, socket.close, socket.create_connection, socket.create_server
Ref: docs.python.org โ socket.herror
Tags: #public #python3 #stdlib #socket
Import
import socket
from socket import herror
Signature & Overview
socket.herror(...)
socket.herror class.
Methods & Attributes
herror.add_note(self, note, /)โ Add a note to the exceptionherror.with_traceback(self, tb, /)โ Set self.traceback to tb and return self.
Usage
import socket
assert issubclass(socket.herror, OSError)
Gotchas
- Raised by legacy
gethostbyaddr()/gethostbyname_ex()on DNS resolution failures.
REPL Inspect
from socket import herror
help(herror)
Linked from
Related notes
- tuts/python3/stdlib_module/socket/has_dualstack_ipv6 Linked here; links to this page; shared tags: #socket, #stdlib
- tuts/python3/stdlib_module/socket/htonl Linked here; links to this page; shared tags: #socket, #stdlib
- tuts/python3/stdlib_module/socket/AddressFamily Linked here; shared tags: #socket, #stdlib
- tuts/python3/stdlib_module/socket/close Linked here; shared tags: #socket, #stdlib
- tuts/python3/stdlib_module/socket/create_connection Linked here; shared tags: #socket, #stdlib
- tuts/python3/stdlib_module/socket/create_server Linked here; shared tags: #socket, #stdlib
- tuts/python3/stdlib_module/socket/socket Linked here; shared tags: #socket, #stdlib
- tuts/python3/stdlib_module/socket links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/socket/dup shared tags: #socket, #stdlib
- tuts/python3/stdlib_module/socket/error shared tags: #socket, #stdlib