diff options
author | Martin Panter <vadmium+py@gmail.com> | 2015-11-02 04:04:57 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2015-11-02 04:04:57 (GMT) |
commit | 2eb819f7a82c7eb61f2d253894d9973f0ec21df2 (patch) | |
tree | c881e371e6ae948cbd725afd91fa8f5b0c6c940f /Doc/library | |
parent | 56275dc1e2a2f354620189efd751fa90af2118e1 (diff) | |
parent | 7462b64911f1e2df2de2285ddbf8b156b5cdc418 (diff) | |
download | cpython-2eb819f7a82c7eb61f2d253894d9973f0ec21df2.zip cpython-2eb819f7a82c7eb61f2d253894d9973f0ec21df2.tar.gz cpython-2eb819f7a82c7eb61f2d253894d9973f0ec21df2.tar.bz2 |
Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/chunk.rst | 2 | ||||
-rw-r--r-- | Doc/library/concurrent.futures.rst | 4 | ||||
-rw-r--r-- | Doc/library/ctypes.rst | 2 | ||||
-rw-r--r-- | Doc/library/difflib.rst | 2 | ||||
-rw-r--r-- | Doc/library/fcntl.rst | 6 | ||||
-rw-r--r-- | Doc/library/ftplib.rst | 4 | ||||
-rw-r--r-- | Doc/library/functions.rst | 6 | ||||
-rw-r--r-- | Doc/library/gzip.rst | 2 | ||||
-rw-r--r-- | Doc/library/http.cookiejar.rst | 2 | ||||
-rw-r--r-- | Doc/library/http.server.rst | 4 | ||||
-rw-r--r-- | Doc/library/mailbox.rst | 2 | ||||
-rw-r--r-- | Doc/library/multiprocessing.rst | 2 | ||||
-rw-r--r-- | Doc/library/nntplib.rst | 2 | ||||
-rw-r--r-- | Doc/library/optparse.rst | 2 | ||||
-rw-r--r-- | Doc/library/os.path.rst | 2 | ||||
-rw-r--r-- | Doc/library/pickle.rst | 4 | ||||
-rw-r--r-- | Doc/library/pyexpat.rst | 2 | ||||
-rw-r--r-- | Doc/library/shutil.rst | 4 | ||||
-rw-r--r-- | Doc/library/smtplib.rst | 4 | ||||
-rw-r--r-- | Doc/library/socket.rst | 4 | ||||
-rw-r--r-- | Doc/library/sqlite3.rst | 2 | ||||
-rw-r--r-- | Doc/library/stdtypes.rst | 2 | ||||
-rw-r--r-- | Doc/library/sunau.rst | 4 | ||||
-rw-r--r-- | Doc/library/tempfile.rst | 2 | ||||
-rw-r--r-- | Doc/library/unittest.mock.rst | 2 | ||||
-rw-r--r-- | Doc/library/xml.dom.pulldom.rst | 2 |
26 files changed, 38 insertions, 38 deletions
diff --git a/Doc/library/chunk.rst b/Doc/library/chunk.rst index 50b6979..a90e9f8 100644 --- a/Doc/library/chunk.rst +++ b/Doc/library/chunk.rst @@ -47,7 +47,7 @@ Usually an IFF-type file consists of one or more chunks. The proposed usage of the :class:`Chunk` class defined here is to instantiate an instance at the start of each chunk and read from the instance until it reaches the end, after which a new instance can be instantiated. At the end of the file, creating a new -instance will fail with a :exc:`EOFError` exception. +instance will fail with an :exc:`EOFError` exception. .. class:: Chunk(file, align=True, bigendian=True, inclheader=False) diff --git a/Doc/library/concurrent.futures.rst b/Doc/library/concurrent.futures.rst index 9ac6171..8bb70a5 100644 --- a/Doc/library/concurrent.futures.rst +++ b/Doc/library/concurrent.futures.rst @@ -90,7 +90,7 @@ Executor Objects ThreadPoolExecutor ------------------ -:class:`ThreadPoolExecutor` is a :class:`Executor` subclass that uses a pool of +:class:`ThreadPoolExecutor` is an :class:`Executor` subclass that uses a pool of threads to execute calls asynchronously. Deadlocks can occur when the callable associated with a :class:`Future` waits on @@ -304,7 +304,7 @@ The :class:`Future` class encapsulates the asynchronous execution of a callable. Added callables are called in the order that they were added and are always called in a thread belonging to the process that added them. If - the callable raises a :exc:`Exception` subclass, it will be logged and + the callable raises an :exc:`Exception` subclass, it will be logged and ignored. If the callable raises a :exc:`BaseException` subclass, the behavior is undefined. diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst index 588ac7c..630d279 100644 --- a/Doc/library/ctypes.rst +++ b/Doc/library/ctypes.rst @@ -39,7 +39,7 @@ loads libraries which export functions using the standard ``cdecl`` calling convention, while *windll* libraries call functions using the ``stdcall`` calling convention. *oledll* also uses the ``stdcall`` calling convention, and assumes the functions return a Windows :c:type:`HRESULT` error code. The error -code is used to automatically raise a :class:`OSError` exception when the +code is used to automatically raise an :class:`OSError` exception when the function call fails. .. versionchanged:: 3.3 diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst index c3dd4d3..e7e5df6 100644 --- a/Doc/library/difflib.rst +++ b/Doc/library/difflib.rst @@ -278,7 +278,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module. generating the delta lines) in unified diff format. Unified diffs are a compact way of showing just the lines that have changed plus - a few lines of context. The changes are shown in a inline style (instead of + a few lines of context. The changes are shown in an inline style (instead of separate before/after blocks). The number of context lines is set by *n* which defaults to three. diff --git a/Doc/library/fcntl.rst b/Doc/library/fcntl.rst index 432140f..e0d184f 100644 --- a/Doc/library/fcntl.rst +++ b/Doc/library/fcntl.rst @@ -16,13 +16,13 @@ interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines. All functions in this module take a file descriptor *fd* as their first argument. This can be an integer file descriptor, such as returned by -``sys.stdin.fileno()``, or a :class:`io.IOBase` object, such as ``sys.stdin`` +``sys.stdin.fileno()``, or an :class:`io.IOBase` object, such as ``sys.stdin`` itself, which provides a :meth:`~io.IOBase.fileno` that returns a genuine file descriptor. .. versionchanged:: 3.3 - Operations in this module used to raise a :exc:`IOError` where they now - raise a :exc:`OSError`. + Operations in this module used to raise an :exc:`IOError` where they now + raise an :exc:`OSError`. The module defines the following functions: diff --git a/Doc/library/ftplib.rst b/Doc/library/ftplib.rst index 3b9f50c..2521f49 100644 --- a/Doc/library/ftplib.rst +++ b/Doc/library/ftplib.rst @@ -287,9 +287,9 @@ followed by ``lines`` for the text version or ``binary`` for the binary version. .. method:: FTP.transfercmd(cmd, rest=None) - Initiate a transfer over the data connection. If the transfer is active, send a + Initiate a transfer over the data connection. If the transfer is active, send an ``EPRT`` or ``PORT`` command and the transfer command specified by *cmd*, and - accept the connection. If the server is passive, send a ``EPSV`` or ``PASV`` + accept the connection. If the server is passive, send an ``EPSV`` or ``PASV`` command, connect to it, and start the transfer command. Either way, return the socket for the connection. diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 3c38b95..c8de062 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1032,9 +1032,9 @@ are always available. They are listed here in alphabetical order. :class:`io.TextIOBase` (specifically :class:`io.TextIOWrapper`). When used to open a file in a binary mode with buffering, the returned class is a subclass of :class:`io.BufferedIOBase`. The exact class varies: in read - binary mode, it returns a :class:`io.BufferedReader`; in write binary and - append binary modes, it returns a :class:`io.BufferedWriter`, and in - read/write mode, it returns a :class:`io.BufferedRandom`. When buffering is + binary mode, it returns an :class:`io.BufferedReader`; in write binary and + append binary modes, it returns an :class:`io.BufferedWriter`, and in + read/write mode, it returns an :class:`io.BufferedRandom`. When buffering is disabled, the raw stream, a subclass of :class:`io.RawIOBase`, :class:`io.FileIO`, is returned. diff --git a/Doc/library/gzip.rst b/Doc/library/gzip.rst index 04c41d5..9492716 100644 --- a/Doc/library/gzip.rst +++ b/Doc/library/gzip.rst @@ -96,7 +96,7 @@ The module defines the following items: Calling a :class:`GzipFile` object's :meth:`close` method does not close *fileobj*, since you might wish to append more material after the compressed - data. This also allows you to pass a :class:`io.BytesIO` object opened for + data. This also allows you to pass an :class:`io.BytesIO` object opened for writing as *fileobj*, and retrieve the resulting memory buffer using the :class:`io.BytesIO` object's :meth:`~io.BytesIO.getvalue` method. diff --git a/Doc/library/http.cookiejar.rst b/Doc/library/http.cookiejar.rst index 30648ac..ca68aac 100644 --- a/Doc/library/http.cookiejar.rst +++ b/Doc/library/http.cookiejar.rst @@ -176,7 +176,7 @@ contained :class:`Cookie` objects. The *response* object (usually the result of a call to :meth:`urllib.request.urlopen`, or similar) should support an :meth:`info` - method, which returns a :class:`email.message.Message` instance. + method, which returns an :class:`email.message.Message` instance. The *request* object (usually a :class:`urllib.request.Request` instance) must support the methods :meth:`get_full_url`, :meth:`get_host`, diff --git a/Doc/library/http.server.rst b/Doc/library/http.server.rst index 1c3e202..0bde35b 100644 --- a/Doc/library/http.server.rst +++ b/Doc/library/http.server.rst @@ -176,7 +176,7 @@ of which this module provides three different variants: .. method:: handle_expect_100() - When a HTTP/1.1 compliant server receives a ``Expect: 100-continue`` + When a HTTP/1.1 compliant server receives an ``Expect: 100-continue`` request header it responds back with a ``100 Continue`` followed by ``200 OK`` headers. This method can be overridden to raise an error if the server does not @@ -210,7 +210,7 @@ of which this module provides three different variants: are picked up from the :meth:`version_string` and :meth:`date_time_string` methods, respectively. If the server does not intend to send any other headers using the :meth:`send_header` method, - then :meth:`send_response` should be followed by a :meth:`end_headers` + then :meth:`send_response` should be followed by an :meth:`end_headers` call. .. versionchanged:: 3.3 diff --git a/Doc/library/mailbox.rst b/Doc/library/mailbox.rst index 6334bd6..d29902d 100644 --- a/Doc/library/mailbox.rst +++ b/Doc/library/mailbox.rst @@ -674,7 +674,7 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF. In Babyl mailboxes, the headers of a message are not stored contiguously with the body of the message. To generate a file-like representation, the - headers and body are copied together into a :class:`io.BytesIO` instance, + headers and body are copied together into an :class:`io.BytesIO` instance, which has an API identical to that of a file. As a result, the file-like object is truly independent of the underlying mailbox but does not save memory compared to a string diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst index e9a9bdd..8575fb5 100644 --- a/Doc/library/multiprocessing.rst +++ b/Doc/library/multiprocessing.rst @@ -1041,7 +1041,7 @@ Connection objects are usually created using :func:`Pipe` -- see also readable. .. versionchanged:: 3.3 - This function used to raise a :exc:`IOError`, which is now an + This function used to raise :exc:`IOError`, which is now an alias of :exc:`OSError`. diff --git a/Doc/library/nntplib.rst b/Doc/library/nntplib.rst index 3943f2c..4797965 100644 --- a/Doc/library/nntplib.rst +++ b/Doc/library/nntplib.rst @@ -341,7 +341,7 @@ tuples or objects that the method normally returns will be empty. .. method:: NNTP.over(message_spec, *, file=None) - Send a ``OVER`` command, or a ``XOVER`` command on legacy servers. + Send an ``OVER`` command, or an ``XOVER`` command on legacy servers. *message_spec* can be either a string representing a message id, or a ``(first, last)`` tuple of numbers indicating a range of articles in the current group, or a ``(first, None)`` tuple indicating a range of diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst index 72145aa..160c29d 100644 --- a/Doc/library/optparse.rst +++ b/Doc/library/optparse.rst @@ -1324,7 +1324,7 @@ where the input parameters are the list of arguments to process (default: ``sys.argv[1:]``) ``values`` - a :class:`optparse.Values` object to store option arguments in (default: a + an :class:`optparse.Values` object to store option arguments in (default: a new instance of :class:`Values`) -- if you give an existing object, the option defaults will not be initialized on it diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst index a3fe73c..4b4e0b4 100644 --- a/Doc/library/os.path.rst +++ b/Doc/library/os.path.rst @@ -289,7 +289,7 @@ the :mod:`glob` module.) Return ``True`` if both pathname arguments refer to the same file or directory. This is determined by the device number and i-node number and raises an - exception if a :func:`os.stat` call on either pathname fails. + exception if an :func:`os.stat` call on either pathname fails. Availability: Unix, Windows. diff --git a/Doc/library/pickle.rst b/Doc/library/pickle.rst index f862065..36b43b4 100644 --- a/Doc/library/pickle.rst +++ b/Doc/library/pickle.rst @@ -221,7 +221,7 @@ process more convenient: The argument *file* must have two methods, a read() method that takes an integer argument, and a readline() method that requires no arguments. Both methods should return bytes. Thus *file* can be an on-disk file opened for - binary reading, a :class:`io.BytesIO` object, or any other custom object + binary reading, an :class:`io.BytesIO` object, or any other custom object that meets this interface. Optional keyword arguments are *fix_imports*, *encoding* and *errors*, @@ -357,7 +357,7 @@ The :mod:`pickle` module exports two classes, :class:`Pickler` and The argument *file* must have two methods, a read() method that takes an integer argument, and a readline() method that requires no arguments. Both methods should return bytes. Thus *file* can be an on-disk file object - opened for binary reading, a :class:`io.BytesIO` object, or any other + opened for binary reading, an :class:`io.BytesIO` object, or any other custom object that meets this interface. Optional keyword arguments are *fix_imports*, *encoding* and *errors*, diff --git a/Doc/library/pyexpat.rst b/Doc/library/pyexpat.rst index 78aa99c..620ffb1 100644 --- a/Doc/library/pyexpat.rst +++ b/Doc/library/pyexpat.rst @@ -763,7 +763,7 @@ The ``errors`` module has the following attributes: .. data:: XML_ERROR_UNDEFINED_ENTITY - A reference was made to a entity which was not defined. + A reference was made to an entity which was not defined. .. data:: XML_ERROR_UNKNOWN_ENCODING diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index bf221bf..904627f 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -207,8 +207,8 @@ Directory and files operations and metadata of the linked files are copied to the new tree. When *symlinks* is false, if the file pointed by the symlink doesn't - exist, a exception will be added in the list of errors raised in - a :exc:`Error` exception at the end of the copy process. + exist, an exception will be added in the list of errors raised in + an :exc:`Error` exception at the end of the copy process. You can set the optional *ignore_dangling_symlinks* flag to true if you want to silence this exception. Notice that this option has no effect on platforms that don't support :func:`os.symlink`. diff --git a/Doc/library/smtplib.rst b/Doc/library/smtplib.rst index a71ee58..8cbd20d 100644 --- a/Doc/library/smtplib.rst +++ b/Doc/library/smtplib.rst @@ -22,7 +22,7 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions). .. class:: SMTP(host='', port=0, local_hostname=None[, timeout], source_address=None) - A :class:`SMTP` instance encapsulates an SMTP connection. It has methods + An :class:`SMTP` instance encapsulates an SMTP connection. It has methods that support a full repertoire of SMTP and ESMTP operations. If the optional host and port parameters are given, the SMTP :meth:`connect` method is called with those parameters during initialization. If specified, @@ -69,7 +69,7 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions). certfile=None [, timeout], context=None, \ source_address=None) - A :class:`SMTP_SSL` instance behaves exactly the same as instances of + An :class:`SMTP_SSL` instance behaves exactly the same as instances of :class:`SMTP`. :class:`SMTP_SSL` should be used for situations where SSL is required from the beginning of the connection and using :meth:`starttls` is not appropriate. If *host* is not specified, the local host is used. If diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index f7b7d3d..2579b0b 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -715,7 +715,7 @@ The :mod:`socket` module also offers various network-related services: Supported values for *address_family* are currently :const:`AF_INET` and :const:`AF_INET6`. If the bytes object *packed_ip* is not the correct length for the specified address family, :exc:`ValueError` will be raised. - A :exc:`OSError` is raised for errors from the call to :func:`inet_ntop`. + :exc:`OSError` is raised for errors from the call to :func:`inet_ntop`. Availability: Unix (maybe not all platforms), Windows. @@ -1014,7 +1014,7 @@ to sockets. interpreted the same way as by the built-in :func:`open` function. The socket must be in blocking mode; it can have a timeout, but the file - object's internal buffer may end up in a inconsistent state if a timeout + object's internal buffer may end up in an inconsistent state if a timeout occurs. Closing the file object returned by :meth:`makefile` won't close the diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index fc69a80..b14ea72 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -615,7 +615,7 @@ Cursor Objects .. attribute:: lastrowid This read-only attribute provides the rowid of the last modified row. It is - only set if you issued a ``INSERT`` statement using the :meth:`execute` + only set if you issued an ``INSERT`` statement using the :meth:`execute` method. For operations other than ``INSERT`` or when :meth:`executemany` is called, :attr:`lastrowid` is set to :const:`None`. diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index f274edb..71fc3b5 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -951,7 +951,7 @@ Notes: runtime cost, you must switch to one of the alternatives below: * if concatenating :class:`str` objects, you can build a list and use - :meth:`str.join` at the end or else write to a :class:`io.StringIO` + :meth:`str.join` at the end or else write to an :class:`io.StringIO` instance and retrieve its value when complete * if concatenating :class:`bytes` objects, you can similarly use diff --git a/Doc/library/sunau.rst b/Doc/library/sunau.rst index a94ae08..bd37ee2 100644 --- a/Doc/library/sunau.rst +++ b/Doc/library/sunau.rst @@ -54,8 +54,8 @@ The :mod:`sunau` module defines the following functions: Note that it does not allow read/write files. - A *mode* of ``'r'`` returns a :class:`AU_read` object, while a *mode* of ``'w'`` - or ``'wb'`` returns a :class:`AU_write` object. + A *mode* of ``'r'`` returns an :class:`AU_read` object, while a *mode* of ``'w'`` + or ``'wb'`` returns an :class:`AU_write` object. .. function:: openfp(file, mode) diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst index 83f9941..beb02a6 100644 --- a/Doc/library/tempfile.rst +++ b/Doc/library/tempfile.rst @@ -96,7 +96,7 @@ The module defines the following user-callable items: causes the file to roll over to an on-disk file regardless of its size. The returned object is a file-like object whose :attr:`_file` attribute - is either a :class:`io.BytesIO` or :class:`io.StringIO` object (depending on + is either an :class:`io.BytesIO` or :class:`io.StringIO` object (depending on whether binary or text *mode* was specified) or a true file object, depending on whether :func:`rollover` has been called. This file-like object can be used in a :keyword:`with` statement, just like diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst index 1b271c8..9a51194 100644 --- a/Doc/library/unittest.mock.rst +++ b/Doc/library/unittest.mock.rst @@ -1131,7 +1131,7 @@ you wanted a :class:`NonCallableMock` to be used: ... TypeError: 'NonCallableMock' object is not callable -Another use case might be to replace an object with a :class:`io.StringIO` instance: +Another use case might be to replace an object with an :class:`io.StringIO` instance: >>> from io import StringIO >>> def foo(): diff --git a/Doc/library/xml.dom.pulldom.rst b/Doc/library/xml.dom.pulldom.rst index a9c9f67..a3b8bc1 100644 --- a/Doc/library/xml.dom.pulldom.rst +++ b/Doc/library/xml.dom.pulldom.rst @@ -47,7 +47,7 @@ Example:: * :data:`PROCESSING_INSTRUCTION` * :data:`IGNORABLE_WHITESPACE` -``node`` is a object of type :class:`xml.dom.minidom.Document`, +``node`` is an object of type :class:`xml.dom.minidom.Document`, :class:`xml.dom.minidom.Element` or :class:`xml.dom.minidom.Text`. Since the document is treated as a "flat" stream of events, the document "tree" |