Skip to content

Commit 106afad

Browse files
committed
Document base_events.py
1 parent 87f466f commit 106afad

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Lib/asyncio/base_events.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ def _ipaddr_info(host, port, family, type, proto, flowinfo=0, scopeid=0):
139139

140140
if isinstance(host, bytes):
141141
host = host.decode('idna')
142+
# Even though we're calling str() on host (so we'll convert arbitrary objects to str),
143+
# we're restricting it to a valid IP address later when calling socket.inet_pton().
142144
host = str(host)
143145
if '%' in host:
144146
# Linux's inet_pton doesn't accept an IPv6 zone index after host,

0 commit comments

Comments
 (0)