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

Signed-off-by: Dorukyum <doruk.ak@hotmail.com>
This commit is contained in:
Dorukyum 2022-12-25 19:49:15 +03:00 committed by Damien George
parent d263438a6e
commit f4811b0b42
1 changed files with 1 additions and 1 deletions

View File

@ -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.