docs/library/socket: Use correct sockaddr variable name.

Signed-off-by: Dorukyum <doruk.ak@hotmail.com>
pull/10331/head
Dorukyum 2022-12-25 19:49:15 +03:00 zatwierdzone przez Damien George
rodzic d263438a6e
commit f4811b0b42
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -29,7 +29,7 @@ returned by `getaddrinfo` function, which must be used to resolve textual addres
# You must use getaddrinfo() even for numeric addresses
sockaddr = socket.getaddrinfo('127.0.0.1', 80)[0][-1]
# Now you can use that address
sock.connect(addr)
sock.connect(sockaddr)
Using `getaddrinfo` is the most efficient (both in terms of memory and processing
power) and portable way to work with addresses.