Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
rhettinger committed Nov 2, 2015
2 parents 67b97b8 + e56a919 commit 0bdf9ea
Show file tree
Hide file tree
Showing 93 changed files with 146 additions and 146 deletions.
2 changes: 1 addition & 1 deletion Doc/c-api/buffer.rst
Expand Up @@ -40,7 +40,7 @@ protocol <bufferobjects>`. This protocol has two sides:

Simple objects such as :class:`bytes` and :class:`bytearray` expose their
underlying buffer in byte-oriented form. Other forms are possible; for example,
the elements exposed by a :class:`array.array` can be multi-byte values.
the elements exposed by an :class:`array.array` can be multi-byte values.

An example consumer of the buffer interface is the :meth:`~io.BufferedIOBase.write`
method of file objects: any object that can export a series of bytes through
Expand Down
2 changes: 1 addition & 1 deletion Doc/faq/programming.rst
Expand Up @@ -849,7 +849,7 @@ How do I modify a string in place?
You can't, because strings are immutable. In most situations, you should
simply construct a new string from the various parts you want to assemble
it from. However, if you need an object with the ability to modify in-place
unicode data, try using a :class:`io.StringIO` object or the :mod:`array`
unicode data, try using an :class:`io.StringIO` object or the :mod:`array`
module::

>>> import io
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/argparse.rst
Expand Up @@ -530,7 +530,7 @@ allow_abbrev
^^^^^^^^^^^^

Normally, when you pass an argument list to the
:meth:`~ArgumentParser.parse_args` method of a :class:`ArgumentParser`,
:meth:`~ArgumentParser.parse_args` method of an :class:`ArgumentParser`,
it :ref:`recognizes abbreviations <prefix-matching>` of long options.

This feature can be disabled by setting ``allow_abbrev`` to ``False``::
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/chunk.rst
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/concurrent.futures.rst
Expand Up @@ -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
Expand Down Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion Doc/library/ctypes.rst
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/difflib.rst
Expand Up @@ -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.

Expand Down
6 changes: 3 additions & 3 deletions Doc/library/fcntl.rst
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/ftplib.rst
Expand Up @@ -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.

Expand Down
6 changes: 3 additions & 3 deletions Doc/library/functions.rst
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion Doc/library/gzip.rst
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion Doc/library/http.cookiejar.rst
Expand Up @@ -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`,
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/http.server.rst
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/mailbox.rst
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/multiprocessing.rst
Expand Up @@ -1046,7 +1046,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`.


Expand Down
2 changes: 1 addition & 1 deletion Doc/library/nntplib.rst
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/optparse.rst
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Doc/library/os.path.rst
Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions Doc/library/pickle.rst
Expand Up @@ -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*,
Expand Down Expand Up @@ -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*,
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/pyexpat.rst
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/shutil.rst
Expand Up @@ -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`.
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/smtplib.rst
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/socket.rst
Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/sqlite3.rst
Expand Up @@ -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`.

Expand Down
2 changes: 1 addition & 1 deletion Doc/library/stdtypes.rst
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/sunau.rst
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/tempfile.rst
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/unittest.mock.rst
Expand Up @@ -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():
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/xml.dom.pulldom.rst
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions Doc/reference/datamodel.rst
Expand Up @@ -2358,7 +2358,7 @@ An *asynchronous iterable* is able to call asynchronous code in its
``__aiter__`` implementation, and an *asynchronous iterator* can call
asynchronous code in its ``__anext__`` method.

Asynchronous iterators can be used in a :keyword:`async for` statement.
Asynchronous iterators can be used in an :keyword:`async for` statement.

.. method:: object.__aiter__(self)

Expand Down Expand Up @@ -2393,7 +2393,7 @@ Asynchronous Context Managers
An *asynchronous context manager* is a *context manager* that is able to
suspend execution in its ``__aenter__`` and ``__aexit__`` methods.

Asynchronous context managers can be used in a :keyword:`async with` statement.
Asynchronous context managers can be used in an :keyword:`async with` statement.

.. method:: object.__aenter__(self)

Expand Down
2 changes: 1 addition & 1 deletion Doc/tutorial/errors.rst
Expand Up @@ -336,7 +336,7 @@ example::
A *finally clause* is always executed before leaving the :keyword:`try`
statement, whether an exception has occurred or not. When an exception has
occurred in the :keyword:`try` clause and has not been handled by an
:keyword:`except` clause (or it has occurred in a :keyword:`except` or
:keyword:`except` clause (or it has occurred in an :keyword:`except` or
:keyword:`else` clause), it is re-raised after the :keyword:`finally` clause has
been executed. The :keyword:`finally` clause is also executed "on the way out"
when any other clause of the :keyword:`try` statement is left via a
Expand Down
2 changes: 1 addition & 1 deletion Doc/tutorial/introduction.rst
Expand Up @@ -303,7 +303,7 @@ For non-negative indices, the length of a slice is the difference of the
indices, if both are within bounds. For example, the length of ``word[1:3]`` is
2.

Attempting to use a index that is too large will result in an error::
Attempting to use an index that is too large will result in an error::

>>> word[42] # the word only has 6 characters
Traceback (most recent call last):
Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/2.1.rst
Expand Up @@ -555,7 +555,7 @@ will include metadata, making it possible to build automated cataloguing systems
and experiment with them. With the result experience, perhaps it'll be possible
to design a really good catalog and then build support for it into Python 2.2.
For example, the Distutils :command:`sdist` and :command:`bdist_\*` commands
could support a ``upload`` option that would automatically upload your
could support an ``upload`` option that would automatically upload your
package to a catalog server.

You can start creating packages containing :file:`PKG-INFO` even if you're not
Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/2.3.rst
Expand Up @@ -411,7 +411,7 @@ PEP 279: enumerate()

A new built-in function, :func:`enumerate`, will make certain loops a bit
clearer. ``enumerate(thing)``, where *thing* is either an iterator or a
sequence, returns a iterator that will return ``(0, thing[0])``, ``(1,
sequence, returns an iterator that will return ``(0, thing[0])``, ``(1,
thing[1])``, ``(2, thing[2])``, and so forth.

A common idiom to change every element of a list looks like this::
Expand Down

0 comments on commit 0bdf9ea

Please sign in to comment.