From 5b32a52393f00e2a886f5e18a81318799a656008 Mon Sep 17 00:00:00 2001 From: Windson yang Date: Mon, 12 Nov 2018 10:43:36 +0800 Subject: [PATCH 1/2] fix typos --- Doc/glossary.rst | 4 ++-- Doc/whatsnew/3.7.rst | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Doc/glossary.rst b/Doc/glossary.rst index b8e773741ce7e2..ace7e6405e0244 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -95,7 +95,7 @@ Glossary that it contains :keyword:`yield` expressions for producing a series of values usable in an :keyword:`async for` loop. - Usually refers to a asynchronous generator function, but may refer to an + Usually refers to an asynchronous generator function, but may refer to an *asynchronous generator iterator* in some contexts. In cases where the intended meaning isn't clear, using the full terms avoids ambiguity. @@ -389,7 +389,7 @@ Glossary An :term:`annotation` of a function parameter or return value. Function annotations are usually used for - :term:`type hints `: for example this function is expected to take two + :term:`type hints `: for example, this function is expected to take two :class:`int` arguments and is also expected to have an :class:`int` return value:: diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index 55cf74f7144957..6ecf540d947674 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -1223,7 +1223,7 @@ can be set within the scope of a group. (Contributed by Serhiy Storchaka in :issue:`25054`.) Regular expressions compiled with the :const:`re.LOCALE` flag no longer -depend on the locale at compile time. Locale settings are applied only +depends on the locale at compile time. Locale settings are applied only when the compiled regular expression is used. (Contributed by Serhiy Storchaka in :issue:`30215`.) @@ -1264,7 +1264,7 @@ The :mod:`socket` module now exposes the :data:`socket.TCP_CONGESTION` (Contributed by Omar Sandoval in :issue:`26273` and Nathaniel J. Smith in :issue:`29728`.) -Support for :data:`socket.AF_VSOCK` sockets has been added to allow +Support for :data:`socket.AF_VSOCK` sockets have been added to allow communication between virtual machines and their hosts. (Contributed by Cathy Avery in :issue:`27584`.) @@ -1378,7 +1378,7 @@ This is equivalent to passing :data:`subprocess.PIPE` as *stdout* and (Contributed by Bo Bayles in :issue:`32102`.) The ``subprocess.run`` function and the :class:`subprocess.Popen` constructor -now accept the *text* keyword argument as an alias +now accepts the *text* keyword argument as an alias to *universal_newlines*. (Contributed by Andrew Clegg in :issue:`31756`.) @@ -1676,7 +1676,7 @@ Added functions :c:func:`PySlice_Unpack` and :c:func:`PySlice_AdjustIndices`. :issue:`16500`.) The ``PyExc_RecursionErrorInst`` singleton that was part of the public API -has been removed as its members being never cleared may cause a segfault +has been removed as its members were never cleared may cause a segfault during finalization of the interpreter. Contributed by Xavier de Gaye in :issue:`22898` and :issue:`30697`. @@ -1855,7 +1855,7 @@ Significant speed improvements to alternate constructors for constructors when not constructing subclasses. (Contributed by Paul Ganssle in :issue:`32403`) -The speed of comparison of :class:`array.array` instances has been +The speed of comparison of :class:`array.array` instances have been improved considerably in certain cases. It is now from 10x to 70x faster when comparing arrays holding values of the same integer type. (Contributed by Adrian Wielgosik in :issue:`24700`.) @@ -1930,7 +1930,7 @@ asyncio ------- Support for directly ``await``-ing instances of :class:`asyncio.Lock` and -other asyncio synchronization primitives has been deprecated. An +other asyncio synchronization primitives have been deprecated. An asynchronous context manager must be used in order to acquire and release the synchronization resource. (Contributed by Andrew Svetlov in :issue:`32253`.) @@ -2378,7 +2378,7 @@ Changes in the Python API instances. (Contributed by Yury Selivanov in :issue:`32327`.) -* :attr:`asyncio.Server.sockets` now returns a copy of the internal list +* :attr:`asyncio.Server.sockets` now return a copy of the internal list of server sockets, instead of returning it directly. (Contributed by Yury Selivanov in :issue:`32662`.) From f89408a6b4962091d5136defbb59fd351733c141 Mon Sep 17 00:00:00 2001 From: Windson yang Date: Mon, 12 Nov 2018 20:30:33 +0800 Subject: [PATCH 2/2] update document typo fix --- Doc/whatsnew/3.7.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst index 6ecf540d947674..55cf74f7144957 100644 --- a/Doc/whatsnew/3.7.rst +++ b/Doc/whatsnew/3.7.rst @@ -1223,7 +1223,7 @@ can be set within the scope of a group. (Contributed by Serhiy Storchaka in :issue:`25054`.) Regular expressions compiled with the :const:`re.LOCALE` flag no longer -depends on the locale at compile time. Locale settings are applied only +depend on the locale at compile time. Locale settings are applied only when the compiled regular expression is used. (Contributed by Serhiy Storchaka in :issue:`30215`.) @@ -1264,7 +1264,7 @@ The :mod:`socket` module now exposes the :data:`socket.TCP_CONGESTION` (Contributed by Omar Sandoval in :issue:`26273` and Nathaniel J. Smith in :issue:`29728`.) -Support for :data:`socket.AF_VSOCK` sockets have been added to allow +Support for :data:`socket.AF_VSOCK` sockets has been added to allow communication between virtual machines and their hosts. (Contributed by Cathy Avery in :issue:`27584`.) @@ -1378,7 +1378,7 @@ This is equivalent to passing :data:`subprocess.PIPE` as *stdout* and (Contributed by Bo Bayles in :issue:`32102`.) The ``subprocess.run`` function and the :class:`subprocess.Popen` constructor -now accepts the *text* keyword argument as an alias +now accept the *text* keyword argument as an alias to *universal_newlines*. (Contributed by Andrew Clegg in :issue:`31756`.) @@ -1676,7 +1676,7 @@ Added functions :c:func:`PySlice_Unpack` and :c:func:`PySlice_AdjustIndices`. :issue:`16500`.) The ``PyExc_RecursionErrorInst`` singleton that was part of the public API -has been removed as its members were never cleared may cause a segfault +has been removed as its members being never cleared may cause a segfault during finalization of the interpreter. Contributed by Xavier de Gaye in :issue:`22898` and :issue:`30697`. @@ -1855,7 +1855,7 @@ Significant speed improvements to alternate constructors for constructors when not constructing subclasses. (Contributed by Paul Ganssle in :issue:`32403`) -The speed of comparison of :class:`array.array` instances have been +The speed of comparison of :class:`array.array` instances has been improved considerably in certain cases. It is now from 10x to 70x faster when comparing arrays holding values of the same integer type. (Contributed by Adrian Wielgosik in :issue:`24700`.) @@ -1930,7 +1930,7 @@ asyncio ------- Support for directly ``await``-ing instances of :class:`asyncio.Lock` and -other asyncio synchronization primitives have been deprecated. An +other asyncio synchronization primitives has been deprecated. An asynchronous context manager must be used in order to acquire and release the synchronization resource. (Contributed by Andrew Svetlov in :issue:`32253`.) @@ -2378,7 +2378,7 @@ Changes in the Python API instances. (Contributed by Yury Selivanov in :issue:`32327`.) -* :attr:`asyncio.Server.sockets` now return a copy of the internal list +* :attr:`asyncio.Server.sockets` now returns a copy of the internal list of server sockets, instead of returning it directly. (Contributed by Yury Selivanov in :issue:`32662`.)