Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit be2528d

Browse files
committed
SF patch #760257: add socket.timeout exception
(Contributed by Bob Halley) Add documentation for the new socket.timeout exception.
1 parent 5918f8d commit be2528d

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

Doc/lib/libsocket.tex

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,14 @@ \section{\module{socket} ---
109109
by the \cfunction{gai_strerror()} C function.
110110
\end{excdesc}
111111

112+
\begin{excdesc}{timeout}
113+
This exception is raised when a timeout occurs on a socket which has
114+
had timeouts enabled via a prior call to \method{settimeout()}. The
115+
accompanying value is a string whose value is currently always ``timed
116+
out''.
117+
\versionadded{2.3}
118+
\end{excdesc}
119+
112120
\begin{datadesc}{AF_UNIX}
113121
\dataline{AF_INET}
114122
\dataline{AF_INET6}
@@ -579,7 +587,7 @@ \subsection{Socket Objects \label{socket-objects}}
579587
Set a timeout on blocking socket operations. The \var{value} argument
580588
can be a nonnegative float expressing seconds, or \code{None}.
581589
If a float is
582-
given, subsequent socket operations will raise an \exception{error}
590+
given, subsequent socket operations will raise an \exception{timeout}
583591
exception if the timeout period \var{value} has elapsed before the
584592
operation has completed. Setting a timeout of \code{None} disables
585593
timeouts on socket operations.

0 commit comments

Comments
 (0)