diff options
author | Georg Brandl <georg@python.org> | 2008-06-23 11:23:31 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-06-23 11:23:31 (GMT) |
commit | 0f7ede45693be57ba51c7aa23a0d841f160de874 (patch) | |
tree | 42f8f578bdf60432c9056b2e300529efb1d9c6b4 /Doc/library/urllib.error.rst | |
parent | aca8fd7a9dc96143e592076fab4d89cc1691d03f (diff) | |
download | cpython-0f7ede45693be57ba51c7aa23a0d841f160de874.zip cpython-0f7ede45693be57ba51c7aa23a0d841f160de874.tar.gz cpython-0f7ede45693be57ba51c7aa23a0d841f160de874.tar.bz2 |
Review the doc changes for the urllib package creation.
Diffstat (limited to 'Doc/library/urllib.error.rst')
-rw-r--r-- | Doc/library/urllib.error.rst | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/Doc/library/urllib.error.rst b/Doc/library/urllib.error.rst index 1cbfe7d..bd76860 100644 --- a/Doc/library/urllib.error.rst +++ b/Doc/library/urllib.error.rst @@ -2,47 +2,47 @@ ================================================================== .. module:: urllib.error - :synopsis: Next generation URL opening library. + :synopsis: Exception classes raised by urllib.request. .. moduleauthor:: Jeremy Hylton <jhylton@users.sourceforge.net> .. sectionauthor:: Senthil Kumaran <orsenthil@gmail.com> -The :mod:`urllib.error` module defines exception classes raise by -urllib.request. The base exception class is URLError, which inherits from -IOError. +The :mod:`urllib.error` module defines the exception classes for exceptions +raised by :mod:`urllib.request`. The base exception class is :exc:`URLError`, +which inherits from :exc:`IOError`. The following exceptions are raised by :mod:`urllib.error` as appropriate: - .. exception:: URLError - The handlers raise this exception (or derived exceptions) when they run into a - problem. It is a subclass of :exc:`IOError`. + The handlers raise this exception (or derived exceptions) when they run into + a problem. It is a subclass of :exc:`IOError`. .. attribute:: reason - The reason for this error. It can be a message string or another exception - instance (:exc:`socket.error` for remote URLs, :exc:`OSError` for local - URLs). + The reason for this error. It can be a message string or another + exception instance (:exc:`socket.error` for remote URLs, :exc:`OSError` + for local URLs). .. exception:: HTTPError - Though being an exception (a subclass of :exc:`URLError`), an :exc:`HTTPError` - can also function as a non-exceptional file-like return value (the same thing - that :func:`urlopen` returns). This is useful when handling exotic HTTP - errors, such as requests for authentication. + Though being an exception (a subclass of :exc:`URLError`), an + :exc:`HTTPError` can also function as a non-exceptional file-like return + value (the same thing that :func:`urlopen` returns). This is useful when + handling exotic HTTP errors, such as requests for authentication. .. attribute:: code - An HTTP status code as defined in `RFC 2616 <http://www.faqs.org/rfcs/rfc2616.html>`_. - This numeric value corresponds to a value found in the dictionary of - codes as found in :attr:`http.server.BaseHTTPRequestHandler.responses`. + An HTTP status code as defined in `RFC 2616 + <http://www.faqs.org/rfcs/rfc2616.html>`_. This numeric value corresponds + to a value found in the dictionary of codes as found in + :attr:`http.server.BaseHTTPRequestHandler.responses`. .. exception:: ContentTooShortError(msg[, content]) - This exception is raised when the :func:`urlretrieve` function detects that the - amount of the downloaded data is less than the expected amount (given by the - *Content-Length* header). The :attr:`content` attribute stores the downloaded - (and supposedly truncated) data. + This exception is raised when the :func:`urlretrieve` function detects that + the amount of the downloaded data is less than the expected amount (given by + the *Content-Length* header). The :attr:`content` attribute stores the + downloaded (and supposedly truncated) data. |