Skip to content

Commit

Permalink
Docs: remove redundant "adverb-adjective" hyphens from compound modif…
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat authored Jul 5, 2022
1 parent 2b8ed4d commit 3440d19
Show file tree
Hide file tree
Showing 71 changed files with 118 additions and 118 deletions.
2 changes: 1 addition & 1 deletion Doc/c-api/allocation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Allocating Objects on the Heap
.. c:function:: PyObject* PyObject_Init(PyObject *op, PyTypeObject *type)
Initialize a newly-allocated object *op* with its type and initial
Initialize a newly allocated object *op* with its type and initial
reference. Returns the initialized object. If *type* indicates that the
object participates in the cyclic garbage detector, it is added to the
detector's set of observed objects. Other fields of the object are not
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ A full list of the various types of debugging builds is in the file
:file:`Misc/SpecialBuilds.txt` in the Python source distribution. Builds are
available that support tracing of reference counts, debugging the memory
allocator, or low-level profiling of the main interpreter loop. Only the most
frequently-used builds will be described in the remainder of this section.
frequently used builds will be described in the remainder of this section.

Compiling the interpreter with the :c:macro:`Py_DEBUG` macro defined produces
what is generally meant by :ref:`a debug build of Python <debug-build>`.
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/memory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ memory manager. For example, this is required when the interpreter is extended
with new object types written in C. Another reason for using the Python heap is
the desire to *inform* the Python memory manager about the memory needs of the
extension module. Even when the requested memory is used exclusively for
internal, highly-specific purposes, delegating all memory requests to the Python
internal, highly specific purposes, delegating all memory requests to the Python
memory manager causes the interpreter to have a more accurate image of its
memory footprint as a whole. Consequently, under certain circumstances, the
Python memory manager may or may not trigger appropriate actions, like garbage
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/typeobj.rst
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ type objects) *must* have the :attr:`ob_size` field.
``PyObject_HEAD_INIT`` macro. For :ref:`statically allocated objects
<static-types>`, these fields always remain ``NULL``. For :ref:`dynamically
allocated objects <heap-types>`, these two fields are used to link the
object into a doubly-linked list of *all* live objects on the heap.
object into a doubly linked list of *all* live objects on the heap.

This could be used for various debugging purposes; currently the only uses
are the :func:`sys.getobjects` function and to print the objects that are
Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/weakref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ as much as it can.
callable object that receives notification when *ob* is garbage collected; it
should accept a single parameter, which will be the weak reference object
itself. *callback* may also be ``None`` or ``NULL``. If *ob* is not a
weakly-referencable object, or if *callback* is not callable, ``None``, or
weakly referencable object, or if *callback* is not callable, ``None``, or
``NULL``, this will return ``NULL`` and raise :exc:`TypeError`.
Expand All @@ -47,7 +47,7 @@ as much as it can.
be a callable object that receives notification when *ob* is garbage
collected; it should accept a single parameter, which will be the weak
reference object itself. *callback* may also be ``None`` or ``NULL``. If *ob*
is not a weakly-referencable object, or if *callback* is not callable,
is not a weakly referencable object, or if *callback* is not callable,
``None``, or ``NULL``, this will return ``NULL`` and raise :exc:`TypeError`.
Expand Down
2 changes: 1 addition & 1 deletion Doc/distutils/apiref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ other utility module.
it contains certain values: see :func:`check_environ`. Raise :exc:`ValueError`
for any variables not found in either *local_vars* or ``os.environ``.

Note that this is not a fully-fledged string interpolation function. A valid
Note that this is not a full-fledged string interpolation function. A valid
``$variable`` can consist only of upper and lower case letters, numbers and an
underscore. No { } or ( ) style quoting is available.

Expand Down
2 changes: 1 addition & 1 deletion Doc/extending/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The initialization function has the signature:

.. c:function:: PyObject* PyInit_modulename(void)
It returns either a fully-initialized module, or a :c:type:`PyModuleDef`
It returns either a fully initialized module, or a :c:type:`PyModuleDef`
instance. See :ref:`initializing-modules` for details.
.. highlight:: python
Expand Down
4 changes: 2 additions & 2 deletions Doc/extending/newtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ example::
}

If no :c:member:`~PyTypeObject.tp_repr` handler is specified, the interpreter will supply a
representation that uses the type's :c:member:`~PyTypeObject.tp_name` and a uniquely-identifying
representation that uses the type's :c:member:`~PyTypeObject.tp_name` and a uniquely identifying
value for the object.

The :c:member:`~PyTypeObject.tp_str` handler is to :func:`str` what the :c:member:`~PyTypeObject.tp_repr` handler
Expand Down Expand Up @@ -589,7 +589,7 @@ with the required field::
PyObject *weakreflist; /* List of weak references */
} TrivialObject;

And the corresponding member in the statically-declared type object::
And the corresponding member in the statically declared type object::

static PyTypeObject TrivialType = {
PyVarObject_HEAD_INIT(NULL, 0)
Expand Down
2 changes: 1 addition & 1 deletion Doc/faq/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ you're too lazy to define a function.

Functions are already first class objects in Python, and can be declared in a
local scope. Therefore the only advantage of using a lambda instead of a
locally-defined function is that you don't need to invent a name for the
locally defined function is that you don't need to invent a name for the
function -- but that's just a local variable to which the function object (which
is exactly the same type of object that a lambda expression yields) is assigned!

Expand Down
4 changes: 2 additions & 2 deletions Doc/faq/programming.rst
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ It's good practice if you import modules in the following order:
1. standard library modules -- e.g. ``sys``, ``os``, ``getopt``, ``re``
2. third-party library modules (anything installed in Python's site-packages
directory) -- e.g. mx.DateTime, ZODB, PIL.Image, etc.
3. locally-developed modules
3. locally developed modules

It is sometimes necessary to move imports to a function or class to avoid
problems with circular imports. Gordon McMillan says:
Expand Down Expand Up @@ -771,7 +771,7 @@ What does the slash(/) in the parameter list of a function mean?

A slash in the argument list of a function denotes that the parameters prior to
it are positional-only. Positional-only parameters are the ones without an
externally-usable name. Upon calling a function that accepts positional-only
externally usable name. Upon calling a function that accepts positional-only
parameters, arguments are mapped to parameters based solely on their position.
For example, :func:`divmod` is a function that accepts positional-only
parameters. Its documentation looks like this::
Expand Down
2 changes: 1 addition & 1 deletion Doc/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ Glossary
machines.

However, some extension modules, either standard or third-party,
are designed so as to release the GIL when doing computationally-intensive
are designed so as to release the GIL when doing computationally intensive
tasks such as compression or hashing. Also, the GIL is always released
when doing I/O.

Expand Down
6 changes: 3 additions & 3 deletions Doc/howto/clinic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ Let's dive in!

16. Compile, then run the relevant portions of the regression-test suite.
This change should not introduce any new compile-time warnings or errors,
and there should be no externally-visible change to Python's behavior.
and there should be no externally visible change to Python's behavior.

Well, except for one difference: ``inspect.signature()`` run on your function
should now provide a valid signature!
Expand Down Expand Up @@ -1117,7 +1117,7 @@ Here's the syntax for cloning a function::
``module.class`` in the sample just to illustrate that you must
use the full path to *both* functions.)

Sorry, there's no syntax for partially-cloning a function, or cloning a function
Sorry, there's no syntax for partially cloning a function, or cloning a function
then modifying it. Cloning is an all-or nothing proposition.

Also, the function you are cloning from must have been previously defined
Expand Down Expand Up @@ -1315,7 +1315,7 @@ to specify in your subclass. Here's the current list:
there is no default, but not specifying a default may
result in an "uninitialized variable" warning. This can
easily happen when using option groups—although
properly-written code will never actually use this value,
properly written code will never actually use this value,
the variable does get passed in to the impl, and the
C compiler will complain about the "use" of the
uninitialized value. This value should always be a
Expand Down
2 changes: 1 addition & 1 deletion Doc/howto/functional.rst
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ further because you risk skipping a discarded element.
The itertools module
====================

The :mod:`itertools` module contains a number of commonly-used iterators as well
The :mod:`itertools` module contains a number of commonly used iterators as well
as functions for combining several iterators. This section will introduce the
module's contents by showing small examples.

Expand Down
4 changes: 2 additions & 2 deletions Doc/howto/instrumentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Sufficiently modern readelf can print the metadata::
Arguments: 8@%rbp 8@%r12 -4@%eax

The above metadata contains information for SystemTap describing how it
can patch strategically-placed machine code instructions to enable the
can patch strategically placed machine code instructions to enable the
tracing hooks used by a SystemTap script.


Expand Down Expand Up @@ -410,7 +410,7 @@ needing to directly name the static markers:
The following script uses the tapset above to provide a top-like view of all
running CPython code, showing the top 20 most frequently-entered bytecode
running CPython code, showing the top 20 most frequently entered bytecode
frames, each second, across the whole system:

.. code-block:: none
Expand Down
2 changes: 1 addition & 1 deletion Doc/howto/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Logging to a file
^^^^^^^^^^^^^^^^^

A very common situation is that of recording logging events in a file, so let's
look at that next. Be sure to try the following in a newly-started Python
look at that next. Be sure to try the following in a newly started Python
interpreter, and don't just continue from the session described above::

import logging
Expand Down
2 changes: 1 addition & 1 deletion Doc/howto/regex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ Additionally, you can retrieve named groups as a dictionary with
>>> m.groupdict()
{'first': 'Jane', 'last': 'Doe'}

Named groups are handy because they let you use easily-remembered names, instead
Named groups are handy because they let you use easily remembered names, instead
of having to remember numbers. Here's an example RE from the :mod:`imaplib`
module::

Expand Down
2 changes: 1 addition & 1 deletion Doc/howto/urllib2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ Openers and Handlers
====================

When you fetch a URL you use an opener (an instance of the perhaps
confusingly-named :class:`urllib.request.OpenerDirector`). Normally we have been using
confusingly named :class:`urllib.request.OpenerDirector`). Normally we have been using
the default opener - via ``urlopen`` - but you can create custom
openers. Openers use handlers. All the "heavy lifting" is done by the
handlers. Each handler knows how to open URLs for a particular URL scheme (http,
Expand Down
2 changes: 1 addition & 1 deletion Doc/install/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ If you download a module source distribution, you can tell pretty quickly if it
was packaged and distributed in the standard way, i.e. using the Distutils.
First, the distribution's name and version number will be featured prominently
in the name of the downloaded archive, e.g. :file:`foo-1.0.tar.gz` or
:file:`widget-0.9.7.zip`. Next, the archive will unpack into a similarly-named
:file:`widget-0.9.7.zip`. Next, the archive will unpack into a similarly named
directory: :file:`foo-1.0` or :file:`widget-0.9.7`. Additionally, the
distribution will contain a setup script :file:`setup.py`, and a file named
:file:`README.txt` or possibly just :file:`README`, which should explain that
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/asynchat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ connection requests.
.. method:: async_chat.push_with_producer(producer)

Takes a producer object and adds it to the producer queue associated with
the channel. When all currently-pushed producers have been exhausted the
the channel. When all currently pushed producers have been exhausted the
channel will consume this producer's data by calling its :meth:`more`
method and send the data to the remote endpoint.

Expand Down
2 changes: 1 addition & 1 deletion Doc/library/custominterp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The modules described in this chapter allow writing interfaces similar to
Python's interactive interpreter. If you want a Python interpreter that
supports some special feature in addition to the Python language, you should
look at the :mod:`code` module. (The :mod:`codeop` module is lower-level, used
to support compiling a possibly-incomplete chunk of Python code.)
to support compiling a possibly incomplete chunk of Python code.)

The full list of modules described in this chapter is:

Expand Down
10 changes: 5 additions & 5 deletions Doc/library/decimal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

--------------

The :mod:`decimal` module provides support for fast correctly-rounded
The :mod:`decimal` module provides support for fast correctly rounded
decimal floating point arithmetic. It offers several advantages over the
:class:`float` datatype:

Expand Down Expand Up @@ -1371,16 +1371,16 @@ In addition to the three supplied contexts, new contexts can be created with the
With two arguments, compute ``x**y``. If ``x`` is negative then ``y``
must be integral. The result will be inexact unless ``y`` is integral and
the result is finite and can be expressed exactly in 'precision' digits.
The rounding mode of the context is used. Results are always correctly-rounded
The rounding mode of the context is used. Results are always correctly rounded
in the Python version.

``Decimal(0) ** Decimal(0)`` results in ``InvalidOperation``, and if ``InvalidOperation``
is not trapped, then results in ``Decimal('NaN')``.

.. versionchanged:: 3.3
The C module computes :meth:`power` in terms of the correctly-rounded
The C module computes :meth:`power` in terms of the correctly rounded
:meth:`exp` and :meth:`ln` functions. The result is well-defined but
only "almost always correctly-rounded".
only "almost always correctly rounded".

With three arguments, compute ``(x**y) % modulo``. For the three argument
form, the following restrictions on the arguments hold:
Expand Down Expand Up @@ -2151,7 +2151,7 @@ Q. Is the CPython implementation fast for large numbers?
A. Yes. In the CPython and PyPy3 implementations, the C/CFFI versions of
the decimal module integrate the high speed `libmpdec
<https://www.bytereef.org/mpdecimal/doc/libmpdec/index.html>`_ library for
arbitrary precision correctly-rounded decimal floating point arithmetic [#]_.
arbitrary precision correctly rounded decimal floating point arithmetic [#]_.
``libmpdec`` uses `Karatsuba multiplication
<https://en.wikipedia.org/wiki/Karatsuba_algorithm>`_
for medium-sized numbers and the `Number Theoretic Transform
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/doctest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -565,12 +565,12 @@ doctest decides whether actual output matches an example's expected output:

When specified, doctests expecting exceptions pass so long as an exception
of the expected type is raised, even if the details
(message and fully-qualified exception name) don't match.
(message and fully qualified exception name) don't match.

For example, an example expecting ``ValueError: 42`` will pass if the actual
exception raised is ``ValueError: 3*14``, but will fail if, say, a
:exc:`TypeError` is raised instead.
It will also ignore any fully-qualified name included before the
It will also ignore any fully qualified name included before the
exception class, which can vary between implementations and versions
of Python and the code/libraries in use.
Hence, all three of these variations will work with the flag specified:
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/glob.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ For example, ``'[?]'`` matches the character ``'?'``.
.. function:: glob(pathname, *, root_dir=None, dir_fd=None, recursive=False, \
include_hidden=False)

Return a possibly-empty list of path names that match *pathname*, which must be
Return a possibly empty list of path names that match *pathname*, which must be
a string containing a path specification. *pathname* can be either absolute
(like :file:`/usr/src/Python-1.5/Makefile`) or relative (like
:file:`../../Tools/\*/\*.gif`), and can contain shell-style wildcards. Broken
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/hmac.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ An HMAC object has the following methods:

.. warning::

When comparing the output of :meth:`digest` to an externally-supplied
When comparing the output of :meth:`digest` to an externally supplied
digest during a verification routine, it is recommended to use the
:func:`compare_digest` function instead of the ``==`` operator
to reduce the vulnerability to timing attacks.
Expand All @@ -83,7 +83,7 @@ An HMAC object has the following methods:

.. warning::

When comparing the output of :meth:`hexdigest` to an externally-supplied
When comparing the output of :meth:`hexdigest` to an externally supplied
digest during a verification routine, it is recommended to use the
:func:`compare_digest` function instead of the ``==`` operator
to reduce the vulnerability to timing attacks.
Expand Down
8 changes: 4 additions & 4 deletions Doc/library/importlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ ABC hierarchy::
reloaded):

- :attr:`__name__`
The module's fully-qualified name.
The module's fully qualified name.
It is ``'__main__'`` for an executed module.

- :attr:`__file__`
Expand All @@ -471,7 +471,7 @@ ABC hierarchy::
as an indicator that the module is a package.

- :attr:`__package__`
The fully-qualified name of the package the module is in (or the
The fully qualified name of the package the module is in (or the
empty string for a top-level module).
If the module is a package then this is the same as :attr:`__name__`.

Expand Down Expand Up @@ -899,7 +899,7 @@ find and load modules.

(:attr:`__name__`)

The module's fully-qualified name.
The module's fully qualified name.
The :term:`finder` should always set this attribute to a non-empty string.

.. attribute:: loader
Expand Down Expand Up @@ -948,7 +948,7 @@ find and load modules.

(:attr:`__package__`)

(Read-only) The fully-qualified name of the package the module is in (or the
(Read-only) The fully qualified name of the package the module is in (or the
empty string for a top-level module).
If the module is a package then this is the same as :attr:`name`.

Expand Down
4 changes: 2 additions & 2 deletions Doc/library/inspect.rst
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ attributes:
| | co_name | name with which this code |
| | | object was defined |
+-----------+-------------------+---------------------------+
| | co_qualname | fully-qualified name with |
| | co_qualname | fully qualified name with |
| | | which this code object |
| | | was defined |
+-----------+-------------------+---------------------------+
Expand Down Expand Up @@ -1130,7 +1130,7 @@ Classes and functions
doesn't have its own annotations dict, returns an empty dict.
* All accesses to object members and dict values are done
using ``getattr()`` and ``dict.get()`` for safety.
* Always, always, always returns a freshly-created dict.
* Always, always, always returns a freshly created dict.

``eval_str`` controls whether or not values of type ``str`` are replaced
with the result of calling :func:`eval()` on those values:
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/mailbox.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,7 @@ The following exception classes are defined in the :mod:`mailbox` module:

Raised when some mailbox-related condition beyond the control of the program
causes it to be unable to proceed, such as when failing to acquire a lock that
another program already holds a lock, or when a uniquely-generated file name
another program already holds a lock, or when a uniquely generated file name
already exists.


Expand Down
Loading

0 comments on commit 3440d19

Please sign in to comment.