" to "allows ing" or similar The original form is incorrect grammar and feels awkward, even though the meaning is clear. [#26304]">

cpython: 4cfc19f667aa (original) (raw)

Mercurial > cpython

changeset 100213:4cfc19f667aa 2.7

Issue #26304: Change "allows to " to "allows ing" or similar The original form is incorrect grammar and feels awkward, even though the meaning is clear. [#26304]

Martin Panter vadmium+py@gmail.com
date Wed, 10 Feb 2016 05:44:01 +0000
parents 8c7a8c7a02b9
children 81dba6e392c3
files Doc/c-api/arg.rst Doc/howto/pyporting.rst Doc/library/ctypes.rst Doc/library/nis.rst Doc/library/tarfile.rst Lib/ctypes/__init__.py Lib/lib-tk/Tkinter.py Lib/test/test_strptime.py Misc/HISTORY Misc/NEWS Modules/_ctypes/_ctypes.c Modules/_ctypes/libffi/m4/libtool.m4
diffstat 12 files changed, 39 insertions(+), 39 deletions(-)[+] [-] Doc/c-api/arg.rst 2 Doc/howto/pyporting.rst 4 Doc/library/ctypes.rst 32 Doc/library/nis.rst 6 Doc/library/tarfile.rst 2 Lib/ctypes/__init__.py 4 Lib/lib-tk/Tkinter.py 4 Lib/test/test_strptime.py 2 Misc/HISTORY 14 Misc/NEWS 4 Modules/_ctypes/_ctypes.c 2 Modules/_ctypes/libffi/m4/libtool.m4 2

line wrap: on

line diff

--- a/Doc/c-api/arg.rst +++ b/Doc/c-api/arg.rst @@ -24,7 +24,7 @@ the format unit; the entry in (round) pa that matches the format unit; and the entry in [square] brackets is the type of the C variable(s) whose address should be passed. -These formats allow to access an object as a contiguous chunk of memory. +These formats allow accessing an object as a contiguous chunk of memory. You don't have to provide raw storage for the returned unicode or bytes area. Also, you won't have to release any memory yourself, except with the es, es#, et and et# formats.

--- a/Doc/howto/pyporting.rst +++ b/Doc/howto/pyporting.rst @@ -243,8 +243,8 @@ bothered to add the b mode when open binary reading). Under Python 3, binary files and text files are clearly distinct and mutually incompatible; see the :mod:io module for details. Therefore, you must make a decision of whether a file will be used for -binary access (allowing to read and/or write binary data) or text access -(allowing to read and/or write text data). You should also use :func:io.open +binary access (allowing binary data to be read and/or written) or text access +(allowing text data to be read and/or written). You should also use :func:io.open for opening files instead of the built-in :func:open function as the :mod:io module is consistent from Python 2 to 3 while the built-in :func:open function is not (in Python 3 it's actually :func:io.open).

--- a/Doc/library/ctypes.rst +++ b/Doc/library/ctypes.rst @@ -934,7 +934,7 @@ other, and finally follow the pointer ch 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 @@ -1404,7 +1404,7 @@ details, consult the :manpage:dlopen(3)[](#l3.12) ignored.[](#l3.13) [](#l3.14) The *use_errno* parameter, when set to True, enables a ctypes mechanism that[](#l3.15) -allows to access the system :data:errno error number in a safe way.[](#l3.16) +allows accessing the system :data:errno error number in a safe way.[](#l3.17) :mod:ctypes maintains a thread-local copy of the systems :data:errno[](#l3.18) variable; if you call foreign functions created with ``use_errno=True`` then the[](#l3.19) :data:errno value before the function call is swapped with the ctypes private[](#l3.20) @@ -1478,7 +1478,7 @@ loader instance.[](#l3.21) Class which loads shared libraries. *dlltype* should be one of the[](#l3.22) :class:CDLL, :class:PyDLL, :class:WinDLL, or :class:OleDLL` types.

@@ -1557,7 +1557,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

@@ -1573,7 +1573,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

@@ -1581,7 +1581,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

.. attribute:: errcheck @@ -1595,12 +1595,12 @@ They are instances of a private class: result is what the foreign function returns, as specified by the :attr:restype attribute.

arguments is a tuple containing the parameters originally passed to

The object that this function returns will be returned from the @@ -1853,7 +1853,7 @@ 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

.. function:: DllCanUnloadNow()

.. function:: DllGetClassObject()

@@ -2432,7 +2432,7 @@ other data types containing pointer type checked, only one field can be accessed when names are repeated. It is possible to define the :attr:_fields_ class variable after the

class List(Structure): @@ -2453,7 +2453,7 @@ other data types containing pointer type .. attribute:: pack

@@ -2465,8 +2465,8 @@ other data types containing pointer type assigned, otherwise it will have no effect. The fields listed in this variable must be structure or union type fields.

Here is an example type (Windows)::

--- a/Doc/library/nis.rst +++ b/Doc/library/nis.rst @@ -27,7 +27,7 @@ The :mod:nis module defines the follow Note that mapname is first checked if it is an alias to another name. .. versionchanged:: 2.5

@@ -40,7 +40,7 @@ The :mod:nis module defines the follow Note that mapname is first checked if it is an alias to another name. .. versionchanged:: 2.5

@@ -49,7 +49,7 @@ The :mod:nis module defines the follow Return a list of all valid maps. .. versionchanged:: 2.5

--- a/Doc/library/tarfile.rst +++ b/Doc/library/tarfile.rst @@ -90,7 +90,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 file object or a tape device. However, such a :class:TarFile object is limited in that it does

--- a/Lib/ctypes/init.py +++ b/Lib/ctypes/init.py @@ -386,8 +386,8 @@ class CDLL(object): return func class PyDLL(CDLL):

--- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -2486,7 +2486,7 @@ class Checkbutton(Widget): self.tk.call(self._w, 'toggle') class Entry(Widget, XView):

@@ -2682,7 +2682,7 @@ class Listbox(Widget, XView, YView): itemconfig = itemconfigure class Menu(Widget):

--- a/Lib/test/test_strptime.py +++ b/Lib/test/test_strptime.py @@ -190,7 +190,7 @@ class TimeRETests(unittest.TestCase): def test_whitespace_substitution(self): # When pattern contains whitespace, make sure it is taken into account

--- a/Misc/HISTORY +++ b/Misc/HISTORY @@ -1845,7 +1845,7 @@ Library

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -623,8 +623,8 @@ Library

--- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -3497,7 +3497,7 @@ PyCFuncPtr_new(PyTypeObject *type, PyObj return NULL; }

--- a/Modules/_ctypes/libffi/m4/libtool.m4 +++ b/Modules/_ctypes/libffi/m4/libtool.m4 @@ -1121,7 +1121,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],

If we don't find anything, use the default library path according

to the aix ld manual.

Store the results from the different compilers for each TAGNAME.

-# Allow to override them for all tags through lt_cv_aix_libpath. +# Allow overriding them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then