mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Refer to the return value on nameindex and friends as a string, not a byte
string. The code was fixed to return strings instead of bytes and to accept either.
This commit is contained in:
parent
abe38da6a4
commit
6352298ac4
1 changed files with 3 additions and 3 deletions
|
@ -539,7 +539,7 @@ The module :mod:`socket` exports the following constants and functions:
|
|||
.. function:: if_nameindex()
|
||||
|
||||
Returns a list of network interface information
|
||||
(index, name as a byte string) tuples.
|
||||
(index, name as a string) tuples.
|
||||
:exc:`socket.error` if the system call fails for any reason.
|
||||
|
||||
Availability: Unix.
|
||||
|
@ -550,7 +550,7 @@ The module :mod:`socket` exports the following constants and functions:
|
|||
.. function:: if_nametoindex(if_name)
|
||||
|
||||
Returns a network interface index number corresponding to an
|
||||
interface name byte string.
|
||||
interface name string.
|
||||
:exc:`socket.error` if no interface with the given name exists.
|
||||
|
||||
Availability: Unix.
|
||||
|
@ -560,7 +560,7 @@ The module :mod:`socket` exports the following constants and functions:
|
|||
|
||||
.. function:: if_indextoname(if_index)
|
||||
|
||||
Returns a network interface name byte string corresponding to a
|
||||
Returns a network interface name string corresponding to a
|
||||
interface index.
|
||||
:exc:`socket.error` if no interface with the given index exists.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue