Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.6] bpo-35110: Fix unintentional spaces around hyphens and dashes. (GH-10231). #10254

Merged
merged 1 commit into from
Oct 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/c-api/veryhigh.rst
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ the same library that the Python runtime is using.
Evaluate a precompiled code object, given a particular environment for its
evaluation. This environment consists of a dictionary of global variables,
a mapping object of local variables, arrays of arguments, keywords and
defaults, a dictionary of default values for :ref:`keyword-only\
defaults, a dictionary of default values for :ref:`keyword-only
<keyword-only_parameter>` arguments and a closure tuple of cells.


Expand Down
9 changes: 5 additions & 4 deletions Doc/distutils/apiref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,9 @@ the full reference.
| *sources* | list of source filenames, | a list of strings |
| | relative to the distribution | |
| | root (where the setup script | |
| | lives), in Unix form (slash- | |
| | separated) for portability. | |
| | lives), in Unix form | |
| | (slash-separated) for | |
| | portability. | |
| | Source files may be C, C++, | |
| | SWIG (.i), platform-specific | |
| | resource files, or whatever | |
Expand Down Expand Up @@ -1565,8 +1566,8 @@ lines, and joining lines with backslashes.
+------------------+--------------------------------+---------+
| option name | description | default |
+==================+================================+=========+
| *strip_comments* | strip from ``'#'`` to end-of- | true |
| | line, as well as any | |
| *strip_comments* | strip from ``'#'`` to | true |
| | end-of-line, as well as any | |
| | whitespace leading up to the | |
| | ``'#'``\ ---unless it is | |
| | escaped by a backslash | |
Expand Down
6 changes: 3 additions & 3 deletions Doc/distutils/builtdist.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ distribution to generate: for example, ::

python setup.py bdist --format=zip

would, when run on a Unix system, create :file:`Distutils-1.0.{plat}.zip`\
---again, this archive would be unpacked from the root directory to install the
Distutils.
would, when run on a Unix system, create
:file:`Distutils-1.0.{plat}.zip`\ ---again, this archive would be unpacked
from the root directory to install the Distutils.

The available formats for built distributions are:

Expand Down
4 changes: 2 additions & 2 deletions Doc/distutils/configfile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ edit is a cheap and easy way to solicit it. Configuration files also let you
provide default values for any command option, which the installer can then
override either on the command-line or by editing the config file.

The setup configuration file is a useful middle-ground between the setup script
---which, ideally, would be opaque to installers [#]_---and the command-line to
The setup configuration file is a useful middle-ground between the setup
script---which, ideally, would be opaque to installers [#]_---and the command-line to
the setup script, which is outside of your control and entirely up to the
installer. In fact, :file:`setup.cfg` (and any other Distutils configuration
files present on the target system) are processed after the contents of the
Expand Down
5 changes: 3 additions & 2 deletions Doc/extending/extending.rst
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,9 @@ or more format codes between parentheses. For example::
:c:func:`PyObject_CallObject` returns a Python object pointer: this is the return
value of the Python function. :c:func:`PyObject_CallObject` is
"reference-count-neutral" with respect to its arguments. In the example a new
tuple was created to serve as the argument list, which is :c:func:`Py_DECREF`\
-ed immediately after the :c:func:`PyObject_CallObject` call.
tuple was created to serve as the argument list, which is
:c:func:`Py_DECREF`\ -ed immediately after the :c:func:`PyObject_CallObject`
call.

The return value of :c:func:`PyObject_CallObject` is "new": either it is a brand
new object, or it is an existing object whose reference count has been
Expand Down
2 changes: 1 addition & 1 deletion Doc/howto/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ provided:

The :class:`NullHandler`, :class:`StreamHandler` and :class:`FileHandler`
classes are defined in the core logging package. The other handlers are
defined in a sub- module, :mod:`logging.handlers`. (There is also another
defined in a sub-module, :mod:`logging.handlers`. (There is also another
sub-module, :mod:`logging.config`, for configuration functionality.)

Logged messages are formatted for presentation through instances of the
Expand Down
16 changes: 8 additions & 8 deletions Doc/install/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,10 @@ C headers ``--install-headers``

These override options can be relative, absolute,
or explicitly defined in terms of one of the installation base directories.
(There are two installation base directories, and they are normally the same---
they only differ when you use the Unix "prefix scheme" and supply different
``--prefix`` and ``--exec-prefix`` options; using ``--install-lib`` will
override values computed or given for ``--install-purelib`` and
(There are two installation base directories, and they are normally the
same---they only differ when you use the Unix "prefix scheme" and supply
different ``--prefix`` and ``--exec-prefix`` options; using ``--install-lib``
will override values computed or given for ``--install-purelib`` and
``--install-platlib``, and is recommended for schemes that don't make a
difference between Python and extension modules.)

Expand All @@ -584,10 +584,10 @@ in this case.)

If you maintain Python on Windows, you might want third-party modules to live in
a subdirectory of :file:`{prefix}`, rather than right in :file:`{prefix}`
itself. This is almost as easy as customizing the script installation directory
---you just have to remember that there are two types of modules to worry about,
Python and extension modules, which can conveniently be both controlled by one
option::
itself. This is almost as easy as customizing the script installation
directory---you just have to remember that there are two types of modules
to worry about, Python and extension modules, which can conveniently be both
controlled by one option::

python setup.py install --install-lib=Site

Expand Down
8 changes: 4 additions & 4 deletions Doc/library/codecs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1121,10 +1121,10 @@ particular, the following variants typically exist:
| | ks_c-5601, ks_c-5601-1987, | |
| | ksx1001, ks_x-1001 | |
+-----------------+--------------------------------+--------------------------------+
| gb2312 | chinese, csiso58gb231280, euc- | Simplified Chinese |
| | cn, euccn, eucgb2312-cn, | |
| | gb2312-1980, gb2312-80, iso- | |
| | ir-58 | |
| gb2312 | chinese, csiso58gb231280, | Simplified Chinese |
| | euc-cn, euccn, eucgb2312-cn, | |
| | gb2312-1980, gb2312-80, | |
| | iso-ir-58 | |
+-----------------+--------------------------------+--------------------------------+
| gbk | 936, cp936, ms936 | Unified Chinese |
+-----------------+--------------------------------+--------------------------------+
Expand Down
7 changes: 4 additions & 3 deletions Doc/library/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,10 @@ Supported operations:
| ``+t1`` | Returns a :class:`timedelta` object with the |
| | same value. (2) |
+--------------------------------+-----------------------------------------------+
| ``-t1`` | equivalent to :class:`timedelta`\ |
| | (-*t1.days*, -*t1.seconds*, |
| | -*t1.microseconds*), and to *t1*\* -1. (1)(4) |
| ``-t1`` | equivalent to |
| | :class:`timedelta`\ (-*t1.days*, |
| | -*t1.seconds*, -*t1.microseconds*), |
| | and to *t1*\* -1. (1)(4) |
+--------------------------------+-----------------------------------------------+
| ``abs(t)`` | equivalent to +\ *t* when ``t.days >= 0``, and|
| | to -*t* when ``t.days < 0``. (2) |
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/email.compat32-message.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ Here are the methods of the :class:`Message` class:

.. method:: is_multipart()

Return ``True`` if the message's payload is a list of sub-\
:class:`Message` objects, otherwise return ``False``. When
Return ``True`` if the message's payload is a list of
sub-\ :class:`Message` objects, otherwise return ``False``. When
:meth:`is_multipart` returns ``False``, the payload should be a string
object (which might be a CTE encoded binary payload. (Note that
:meth:`is_multipart` returning ``True`` does not necessarily mean that
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/email.message.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ message objects.

.. method:: is_multipart()

Return ``True`` if the message's payload is a list of sub-\
:class:`EmailMessage` objects, otherwise return ``False``. When
Return ``True`` if the message's payload is a list of
sub-\ :class:`EmailMessage` objects, otherwise return ``False``. When
:meth:`is_multipart` returns ``False``, the payload should be a string
object (which might be a CTE encoded binary payload). Note that
:meth:`is_multipart` returning ``True`` does not necessarily mean that
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ re-entrant, and so cannot be invoked from such signal handlers.
Module-Level Functions
----------------------

In addition to the classes described above, there are a number of module- level
In addition to the classes described above, there are a number of module-level
functions.


Expand Down
14 changes: 7 additions & 7 deletions Doc/library/optparse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -379,17 +379,17 @@ types is covered in section :ref:`optparse-extending-optparse`.
Handling boolean (flag) options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Flag options---set a variable to true or false when a particular option is seen
---are quite common. :mod:`optparse` supports them with two separate actions,
Flag options---set a variable to true or false when a particular option is
seen---are quite common. :mod:`optparse` supports them with two separate actions,
``store_true`` and ``store_false``. For example, you might have a ``verbose``
flag that is turned on with ``-v`` and off with ``-q``::

parser.add_option("-v", action="store_true", dest="verbose")
parser.add_option("-q", action="store_false", dest="verbose")

Here we have two different options with the same destination, which is perfectly
OK. (It just means you have to be a bit careful when setting default values---
see below.)
OK. (It just means you have to be a bit careful when setting default
values---see below.)

When :mod:`optparse` encounters ``-v`` on the command line, it sets
``options.verbose`` to ``True``; when it encounters ``-q``,
Expand Down Expand Up @@ -525,9 +525,9 @@ help message:
default: ``"Usage: %prog [options]"``, which is fine if your script doesn't
take any positional arguments.

* every option defines a help string, and doesn't worry about line-wrapping---
:mod:`optparse` takes care of wrapping lines and making the help output look
good.
* every option defines a help string, and doesn't worry about
line-wrapping---\ :mod:`optparse` takes care of wrapping lines and making
the help output look good.

* options that take a value indicate this fact in their automatically-generated
help message, e.g. for the "mode" option::
Expand Down
10 changes: 5 additions & 5 deletions Doc/library/os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3557,11 +3557,11 @@ written in Python, such as a mail server's external command delivery program.
.. function:: wait3(options)

Similar to :func:`waitpid`, except no process id argument is given and a
3-element tuple containing the child's process id, exit status indication, and
resource usage information is returned. Refer to :mod:`resource`.\
:func:`~resource.getrusage` for details on resource usage information. The
option argument is the same as that provided to :func:`waitpid` and
:func:`wait4`.
3-element tuple containing the child's process id, exit status indication,
and resource usage information is returned. Refer to
:mod:`resource`.\ :func:`~resource.getrusage` for details on resource usage
information. The option argument is the same as that provided to
:func:`waitpid` and :func:`wait4`.

Availability: Unix.

Expand Down
3 changes: 1 addition & 2 deletions Doc/library/ossaudiodev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ and (read-only) attributes:
number of bytes written. If the audio device is in blocking mode (the
default), the entire data is always written (again, this is different from
usual Unix device semantics). If the device is in non-blocking mode, some
data may not be written
---see :meth:`writeall`.
data may not be written---see :meth:`writeall`.

.. versionchanged:: 3.5
Writable :term:`bytes-like object` is now accepted.
Expand Down
6 changes: 3 additions & 3 deletions Doc/library/stat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ mode:

.. function:: S_IMODE(mode)

Return the portion of the file's mode that can be set by :func:`os.chmod`\
---that is, the file's permission bits, plus the sticky bit, set-group-id, and
set-user-id bits (on systems that support them).
Return the portion of the file's mode that can be set by
:func:`os.chmod`\ ---that is, the file's permission bits, plus the sticky
bit, set-group-id, and set-user-id bits (on systems that support them).


.. function:: S_IFMT(mode)
Expand Down
8 changes: 4 additions & 4 deletions Doc/library/string.rst
Original file line number Diff line number Diff line change
Expand Up @@ -458,11 +458,11 @@ The available integer presentation types are:
+---------+----------------------------------------------------------+
| ``'o'`` | Octal format. Outputs the number in base 8. |
+---------+----------------------------------------------------------+
| ``'x'`` | Hex format. Outputs the number in base 16, using lower- |
| | case letters for the digits above 9. |
| ``'x'`` | Hex format. Outputs the number in base 16, using |
| | lower-case letters for the digits above 9. |
+---------+----------------------------------------------------------+
| ``'X'`` | Hex format. Outputs the number in base 16, using upper- |
| | case letters for the digits above 9. |
| ``'X'`` | Hex format. Outputs the number in base 16, using |
| | upper-case letters for the digits above 9. |
+---------+----------------------------------------------------------+
| ``'n'`` | Number. This is the same as ``'d'``, except that it uses |
| | the current locale setting to insert the appropriate |
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/termios.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ The module defines the following functions:

.. function:: tcsendbreak(fd, duration)

Send a break on file descriptor *fd*. A zero *duration* sends a break for 0.25
--0.5 seconds; a nonzero *duration* has a system dependent meaning.
Send a break on file descriptor *fd*. A zero *duration* sends a break for
0.25--0.5 seconds; a nonzero *duration* has a system dependent meaning.


.. function:: tcdrain(fd)
Expand Down
4 changes: 2 additions & 2 deletions Doc/tutorial/controlflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -572,8 +572,8 @@ or tuple::
.. index::
single: **; in function calls

In the same fashion, dictionaries can deliver keyword arguments with the ``**``\
-operator::
In the same fashion, dictionaries can deliver keyword arguments with the
``**``\ -operator::

>>> def parrot(voltage, state='a stiff', action='voom'):
... print("-- This parrot wouldn't", action, end=' ')
Expand Down
6 changes: 3 additions & 3 deletions Doc/whatsnew/2.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -576,9 +576,9 @@ similar to a :keyword:`return` statement. The big difference between
variables are preserved. On the next call to the generator's ``next()`` method,
the function will resume executing immediately after the :keyword:`yield`
statement. (For complicated reasons, the :keyword:`yield` statement isn't
allowed inside the :keyword:`try` block of a :keyword:`try`...\
:keyword:`finally` statement; read :pep:`255` for a full explanation of the
interaction between :keyword:`yield` and exceptions.)
allowed inside the :keyword:`try` block of a
:keyword:`try`...\ :keyword:`finally` statement; read :pep:`255` for a full
explanation of the interaction between :keyword:`yield` and exceptions.)

Here's a sample usage of the :func:`generate_ints` generator::

Expand Down
10 changes: 5 additions & 5 deletions Doc/whatsnew/2.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ similar to a :keyword:`return` statement. The big difference between
variables are preserved. On the next call to the generator's ``.next()``
method, the function will resume executing immediately after the
:keyword:`yield` statement. (For complicated reasons, the :keyword:`yield`
statement isn't allowed inside the :keyword:`try` block of a :keyword:`try`...\
:keyword:`finally` statement; read :pep:`255` for a full explanation of the
interaction between :keyword:`yield` and exceptions.)
statement isn't allowed inside the :keyword:`try` block of a
:keyword:`try`...\ :keyword:`finally` statement; read :pep:`255` for a full
explanation of the interaction between :keyword:`yield` and exceptions.)

Here's a sample usage of the :func:`generate_ints` generator::

Expand Down Expand Up @@ -1247,8 +1247,8 @@ complete list of changes, or look through the CVS logs for all the details.
will have to change your ``import`` statements to import it as :mod:`bsddb`.

* The new :mod:`bz2` module is an interface to the bz2 data compression library.
bz2-compressed data is usually smaller than corresponding :mod:`zlib`\
-compressed data. (Contributed by Gustavo Niemeyer.)
bz2-compressed data is usually smaller than corresponding
:mod:`zlib`\ -compressed data. (Contributed by Gustavo Niemeyer.)

* A set of standard date/time types has been added in the new :mod:`datetime`
module. See the following section for more details.
Expand Down
5 changes: 3 additions & 2 deletions Doc/whatsnew/2.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,9 @@ when you're doing something with the returned value, as in the above example.
The parentheses aren't always necessary, but it's easier to always add them
instead of having to remember when they're needed.

(:pep:`342` explains the exact rules, which are that a :keyword:`yield`\
-expression must always be parenthesized except when it occurs at the top-level
(:pep:`342` explains the exact rules, which are that a
:keyword:`yield`\ -expression must always be parenthesized except when it
occurs at the top-level
expression on the right-hand side of an assignment. This means you can write
``val = yield i`` but have to use parentheses when there's an operation, as in
``val = (yield i) + 12``.)
Expand Down
8 changes: 4 additions & 4 deletions Doc/whatsnew/3.4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1452,10 +1452,10 @@ in :issue:`18143`.)

:class:`~ssl.SSLContext` has a new method,
:meth:`~ssl.SSLContext.cert_store_stats`, that reports the number of loaded
``X.509`` certs, ``X.509 CA`` certs, and certificate revocation lists (``crl``\
s), as well as a :meth:`~ssl.SSLContext.get_ca_certs` method that returns a
list of the loaded ``CA`` certificates. (Contributed by Christian Heimes in
:issue:`18147`.)
``X.509`` certs, ``X.509 CA`` certs, and certificate revocation lists
(``crl``\ s), as well as a :meth:`~ssl.SSLContext.get_ca_certs` method that
returns a list of the loaded ``CA`` certificates. (Contributed by Christian
Heimes in :issue:`18147`.)

If OpenSSL 0.9.8 or later is available, :class:`~ssl.SSLContext` has a new
attribute :attr:`~ssl.SSLContext.verify_flags` that can be used to control the
Expand Down
Loading