Issue #26304: Change "allows to <verb>" to "allows <verb>ing" or similar

The original form is incorrect grammar and feels awkward, even though the
meaning is clear.
This commit is contained in:
Martin Panter 2016-02-10 05:44:01 +00:00
parent 96a4f07107
commit c04fb56e36
25 changed files with 76 additions and 76 deletions

View file

@ -253,7 +253,7 @@ Creating connections
a class. For example, if you want to use a pre-created
protocol instance, you can pass ``lambda: my_protocol``.
Options allowing to change how the connection is created:
Options that change how the connection is created:
* *ssl*: if given and not false, a SSL/TLS transport is created
(by default a plain TCP transport is created). If *ssl* is
@ -654,7 +654,7 @@ pool of processes). By default, an event loop uses a thread pool executor
Error Handling API
------------------
Allows to customize how exceptions are handled in the event loop.
Allows customizing how exceptions are handled in the event loop.
.. method:: BaseEventLoop.set_exception_handler(handler)

View file

@ -510,7 +510,7 @@ Task functions
.. note::
In the functions below, the optional *loop* argument allows to explicitly set
In the functions below, the optional *loop* argument allows explicitly setting
the event loop object used by the underlying task or coroutine. If it's
not provided, the default event loop is used.

View file

@ -942,7 +942,7 @@ other, and finally follow the pointer chain a few times::
Callback functions
^^^^^^^^^^^^^^^^^^
:mod:`ctypes` allows to create C callable function pointers from Python callables.
:mod:`ctypes` allows creating C callable function pointers from Python callables.
These are sometimes called *callback functions*.
First, you must create a class for the callback function. The class knows the
@ -1350,7 +1350,7 @@ details, consult the :manpage:`dlopen(3)` manpage, on Windows, *mode* is
ignored.
The *use_errno* parameter, when set to True, enables a ctypes mechanism that
allows to access the system :data:`errno` error number in a safe way.
allows accessing the system :data:`errno` error number in a safe way.
:mod:`ctypes` maintains a thread-local copy of the systems :data:`errno`
variable; if you call foreign functions created with ``use_errno=True`` then the
:data:`errno` value before the function call is swapped with the ctypes private
@ -1421,7 +1421,7 @@ loader instance.
Class which loads shared libraries. *dlltype* should be one of the
:class:`CDLL`, :class:`PyDLL`, :class:`WinDLL`, or :class:`OleDLL` types.
:meth:`__getattr__` has special behavior: It allows to load a shared library by
:meth:`__getattr__` has special behavior: It allows loading a shared library by
accessing it as attribute of a library loader instance. The result is cached,
so repeated attribute accesses return the same library each time.
@ -1498,7 +1498,7 @@ They are instances of a private class:
It is possible to assign a callable Python object that is not a ctypes
type, in this case the function is assumed to return a C :c:type:`int`, and
the callable will be called with this integer, allowing to do further
the callable will be called with this integer, allowing further
processing or error checking. Using this is deprecated, for more flexible
post processing or error checking use a ctypes data type as
:attr:`restype` and assign a callable to the :attr:`errcheck` attribute.
@ -1513,7 +1513,7 @@ They are instances of a private class:
When a foreign function is called, each actual argument is passed to the
:meth:`from_param` class method of the items in the :attr:`argtypes`
tuple, this method allows to adapt the actual argument to an object that
tuple, this method allows adapting the actual argument to an object that
the foreign function accepts. For example, a :class:`c_char_p` item in
the :attr:`argtypes` tuple will convert a string passed as argument into
a bytes object using ctypes conversion rules.
@ -1521,7 +1521,7 @@ They are instances of a private class:
New: It is now possible to put items in argtypes which are not ctypes
types, but each item must have a :meth:`from_param` method which returns a
value usable as argument (integer, string, ctypes instance). This allows
to define adapters that can adapt custom objects as function parameters.
defining adapters that can adapt custom objects as function parameters.
.. attribute:: errcheck
@ -1535,12 +1535,12 @@ They are instances of a private class:
*result* is what the foreign function returns, as specified by the
:attr:`restype` attribute.
*func* is the foreign function object itself, this allows to reuse the
*func* is the foreign function object itself, this allows reusing the
same callable object to check or post process the results of several
functions.
*arguments* is a tuple containing the parameters originally passed to
the function call, this allows to specialize the behavior on the
the function call, this allows specializing the behavior on the
arguments used.
The object that this function returns will be returned from the
@ -1785,7 +1785,7 @@ Utility functions
If a bytes object is specified as first argument, the buffer is made one item
larger than its length so that the last element in the array is a NUL
termination character. An integer can be passed as second argument which allows
to specify the size of the array if the length of the bytes should not be used.
specifying the size of the array if the length of the bytes should not be used.
@ -1800,21 +1800,21 @@ Utility functions
If a string is specified as first argument, the buffer is made one item
larger than the length of the string so that the last element in the array is a
NUL termination character. An integer can be passed as second argument which
allows to specify the size of the array if the length of the string should not
allows specifying the size of the array if the length of the string should not
be used.
.. function:: DllCanUnloadNow()
Windows only: This function is a hook which allows to implement in-process
Windows only: This function is a hook which allows implementing in-process
COM servers with ctypes. It is called from the DllCanUnloadNow function that
the _ctypes extension dll exports.
.. function:: DllGetClassObject()
Windows only: This function is a hook which allows to implement in-process
Windows only: This function is a hook which allows implementing in-process
COM servers with ctypes. It is called from the DllGetClassObject function
that the ``_ctypes`` extension dll exports.
@ -2321,7 +2321,7 @@ other data types containing pointer type fields.
checked, only one field can be accessed when names are repeated.
It is possible to define the :attr:`_fields_` class variable *after* the
class statement that defines the Structure subclass, this allows to create
class statement that defines the Structure subclass, this allows creating
data types that directly or indirectly reference themselves::
class List(Structure):
@ -2342,7 +2342,7 @@ other data types containing pointer type fields.
.. attribute:: _pack_
An optional small integer that allows to override the alignment of
An optional small integer that allows overriding the alignment of
structure fields in the instance. :attr:`_pack_` must already be defined
when :attr:`_fields_` is assigned, otherwise it will have no effect.
@ -2354,8 +2354,8 @@ other data types containing pointer type fields.
assigned, otherwise it will have no effect.
The fields listed in this variable must be structure or union type fields.
:mod:`ctypes` will create descriptors in the structure type that allows to
access the nested fields directly, without the need to create the
:mod:`ctypes` will create descriptors in the structure type that allows
accessing the nested fields directly, without the need to create the
structure or union field.
Here is an example type (Windows)::

View file

@ -26,7 +26,7 @@ The :mod:`nis` module defines the following functions:
Note that *mapname* is first checked if it is an alias to another name.
The *domain* argument allows to override the NIS domain used for the lookup. If
The *domain* argument allows overriding the NIS domain used for the lookup. If
unspecified, lookup is in the default NIS domain.
@ -38,7 +38,7 @@ The :mod:`nis` module defines the following functions:
Note that *mapname* is first checked if it is an alias to another name.
The *domain* argument allows to override the NIS domain used for the lookup. If
The *domain* argument allows overriding the NIS domain used for the lookup. If
unspecified, lookup is in the default NIS domain.
@ -46,7 +46,7 @@ The :mod:`nis` module defines the following functions:
Return a list of all valid maps.
The *domain* argument allows to override the NIS domain used for the lookup. If
The *domain* argument allows overriding the NIS domain used for the lookup. If
unspecified, lookup is in the default NIS domain.

View file

@ -11,7 +11,7 @@ This module provides mechanisms to use signal handlers in Python.
General rules
-------------
The :func:`signal.signal` function allows to define custom handlers to be
The :func:`signal.signal` function allows defining custom handlers to be
executed when a signal is received. A small number of default handlers are
installed: :const:`SIGPIPE` is ignored (so write errors on pipes and sockets
can be reported as ordinary Python exceptions) and :const:`SIGINT` is

View file

@ -33,7 +33,7 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
*timeout* parameter specifies a timeout in seconds for blocking operations
like the connection attempt (if not specified, the global default timeout
setting will be used). If the timeout expires, :exc:`socket.timeout` is
raised. The optional source_address parameter allows to bind
raised. The optional source_address parameter allows binding
to some specific source address in a machine with multiple network
interfaces, and/or to some specific source TCP port. It takes a 2-tuple
(host, port), for the socket to bind to as its source address before
@ -76,7 +76,7 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
*port* is zero, the standard SMTP-over-SSL port (465) is used. The optional
arguments *local_hostname*, *timeout* and *source_address* have the same
meaning as they do in the :class:`SMTP` class. *context*, also optional,
can contain a :class:`~ssl.SSLContext` and allows to configure various
can contain a :class:`~ssl.SSLContext` and allows configuring various
aspects of the secure connection. Please read :ref:`ssl-security` for
best practices.

View file

@ -111,7 +111,7 @@ Some facts and figures:
specifies the blocksize and defaults to ``20 * 512`` bytes. Use this variant
in combination with e.g. ``sys.stdin``, a socket :term:`file object` or a tape
device. However, such a :class:`TarFile` object is limited in that it does
not allow to be accessed randomly, see :ref:`tar-examples`. The currently
not allow random access, see :ref:`tar-examples`. The currently
possible modes:
+-------------+--------------------------------------------+