mirror of
https://github.com/python/cpython.git
synced 2025-09-28 03:13:48 +00:00
Add notes that fromfd() and s.makefile() are Unix-specific.
This fixes SF bug #495896. Fix up various markup consistency & style guide conformance nits.
This commit is contained in:
parent
09aa55a090
commit
87fa3aa12c
1 changed files with 14 additions and 12 deletions
|
@ -90,22 +90,22 @@ names for the error codes defined by the underlying operating system.
|
||||||
|
|
||||||
\begin{excdesc}{herror}
|
\begin{excdesc}{herror}
|
||||||
This exception is raised for address-related errors, i.e. for
|
This exception is raised for address-related errors, i.e. for
|
||||||
functions that use \var{h_errno} in C API, including
|
functions that use \var{h_errno} in the C API, including
|
||||||
\function{gethostbyname_ex} and \function{gethostbyaddr}.
|
\function{gethostbyname_ex()} and \function{gethostbyaddr()}.
|
||||||
|
|
||||||
The accompanying value is a pair \code{(\var{h_errno}, \var{string})}
|
The accompanying value is a pair \code{(\var{h_errno}, \var{string})}
|
||||||
representing an error returned by a library call. \var{string}
|
representing an error returned by a library call. \var{string}
|
||||||
represents the description of \var{h_errno}, as returned by
|
represents the description of \var{h_errno}, as returned by
|
||||||
\cfunction{hstrerror} C API.
|
the \cfunction{hstrerror()} C function.
|
||||||
\end{excdesc}
|
\end{excdesc}
|
||||||
|
|
||||||
\begin{excdesc}{gaierror}
|
\begin{excdesc}{gaierror}
|
||||||
This exception is raised for address-related errors, for
|
This exception is raised for address-related errors, for
|
||||||
\function{getaddrinfo} and \function{getnameinfo}.
|
\function{getaddrinfo()} and \function{getnameinfo()}.
|
||||||
The accompanying value is a pair \code{(\var{error}, \var{string})}
|
The accompanying value is a pair \code{(\var{error}, \var{string})}
|
||||||
representing an error returned by a library call.
|
representing an error returned by a library call.
|
||||||
\var{string} represents the description of \var{error}, as returned
|
\var{string} represents the description of \var{error}, as returned
|
||||||
by \cfunction{gai_strerror} C API.
|
by the \cfunction{gai_strerror()} C function.
|
||||||
\end{excdesc}
|
\end{excdesc}
|
||||||
|
|
||||||
\begin{datadesc}{AF_UNIX}
|
\begin{datadesc}{AF_UNIX}
|
||||||
|
@ -189,7 +189,7 @@ returned.
|
||||||
|
|
||||||
\begin{funcdesc}{gethostbyname}{hostname}
|
\begin{funcdesc}{gethostbyname}{hostname}
|
||||||
Translate a host name to IPv4 address format. The IPv4 address is
|
Translate a host name to IPv4 address format. The IPv4 address is
|
||||||
returned as a string, e.g., \code{'100.50.200.5'}. If the host name
|
returned as a string, such as \code{'100.50.200.5'}. If the host name
|
||||||
is an IPv4 address itself it is returned unchanged. See
|
is an IPv4 address itself it is returned unchanged. See
|
||||||
\function{gethostbyname_ex()} for a more complete interface.
|
\function{gethostbyname_ex()} for a more complete interface.
|
||||||
\function{gethostbyname()} does not support IPv6 name resolution, and
|
\function{gethostbyname()} does not support IPv6 name resolution, and
|
||||||
|
@ -243,7 +243,7 @@ numeric port number.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{getprotobyname}{protocolname}
|
\begin{funcdesc}{getprotobyname}{protocolname}
|
||||||
Translate an Internet protocol name (e.g.\ \code{'icmp'}) to a constant
|
Translate an Internet protocol name (for example, \code{'icmp'}) to a constant
|
||||||
suitable for passing as the (optional) third argument to the
|
suitable for passing as the (optional) third argument to the
|
||||||
\function{socket()} function. This is usually only needed for sockets
|
\function{socket()} function. This is usually only needed for sockets
|
||||||
opened in ``raw'' mode (\constant{SOCK_RAW}); for the normal socket
|
opened in ``raw'' mode (\constant{SOCK_RAW}); for the normal socket
|
||||||
|
@ -282,8 +282,9 @@ above. The file descriptor should refer to a socket, but this is not
|
||||||
checked --- subsequent operations on the object may fail if the file
|
checked --- subsequent operations on the object may fail if the file
|
||||||
descriptor is invalid. This function is rarely needed, but can be
|
descriptor is invalid. This function is rarely needed, but can be
|
||||||
used to get or set socket options on a socket passed to a program as
|
used to get or set socket options on a socket passed to a program as
|
||||||
standard input or output (e.g.\ a server started by the \UNIX{} inet
|
standard input or output (such as a server started by the \UNIX{} inet
|
||||||
daemon).
|
daemon).
|
||||||
|
Availability: \UNIX.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{ntohl}{x}
|
\begin{funcdesc}{ntohl}{x}
|
||||||
|
@ -311,8 +312,8 @@ no-op; otherwise, it performs a 2-byte swap operation.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{inet_aton}{ip_string}
|
\begin{funcdesc}{inet_aton}{ip_string}
|
||||||
Convert an IPv4 address from dotted-quad string format
|
Convert an IPv4 address from dotted-quad string format (for example,
|
||||||
(e.g.\ '123.45.67.89') to 32-bit packed binary format, as a string four
|
'123.45.67.89') to 32-bit packed binary format, as a string four
|
||||||
characters in length.
|
characters in length.
|
||||||
|
|
||||||
Useful when conversing with a program that uses the standard C library
|
Useful when conversing with a program that uses the standard C library
|
||||||
|
@ -331,7 +332,7 @@ valid depends on the underlying C implementation of
|
||||||
\begin{funcdesc}{inet_ntoa}{packed_ip}
|
\begin{funcdesc}{inet_ntoa}{packed_ip}
|
||||||
Convert a 32-bit packed IPv4 address (a string four characters in
|
Convert a 32-bit packed IPv4 address (a string four characters in
|
||||||
length) to its standard dotted-quad string representation
|
length) to its standard dotted-quad string representation
|
||||||
(e.g. '123.45.67.89').
|
(for example, '123.45.67.89').
|
||||||
|
|
||||||
Useful when conversing with a program that uses the standard C library
|
Useful when conversing with a program that uses the standard C library
|
||||||
and needs objects of type \ctype{struct in_addr}, which is the C type
|
and needs objects of type \ctype{struct in_addr}, which is the C type
|
||||||
|
@ -400,7 +401,7 @@ instead of raising an exception for errors returned by the C-level
|
||||||
\cfunction{connect()} call (other problems, such as ``host not found,''
|
\cfunction{connect()} call (other problems, such as ``host not found,''
|
||||||
can still raise exceptions). The error indicator is \code{0} if the
|
can still raise exceptions). The error indicator is \code{0} if the
|
||||||
operation succeeded, otherwise the value of the \cdata{errno}
|
operation succeeded, otherwise the value of the \cdata{errno}
|
||||||
variable. This is useful, e.g., for asynchronous connects.
|
variable. This is useful to support, for example, asynchronous connects.
|
||||||
\note{This method has historically accepted a pair of
|
\note{This method has historically accepted a pair of
|
||||||
parameters for \constant{AF_INET} addresses instead of only a tuple.
|
parameters for \constant{AF_INET} addresses instead of only a tuple.
|
||||||
This was never intentional and is no longer be available in Python
|
This was never intentional and is no longer be available in Python
|
||||||
|
@ -454,6 +455,7 @@ closed or garbage-collected independently.
|
||||||
and \var{bufsize} arguments are interpreted the same way as by the
|
and \var{bufsize} arguments are interpreted the same way as by the
|
||||||
built-in \function{file()} function; see ``Built-in Functions''
|
built-in \function{file()} function; see ``Built-in Functions''
|
||||||
(section \ref{built-in-funcs}) for more information.
|
(section \ref{built-in-funcs}) for more information.
|
||||||
|
Availability: \UNIX.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}[socket]{recv}{bufsize\optional{, flags}}
|
\begin{methoddesc}[socket]{recv}{bufsize\optional{, flags}}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue