Skip to content

Commit 77bf973

Browse files
Docs: remove redundant "adverb-adjective" hyphens from compound modifiers (pythonGH-94551) (pythonGH-94557)
Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021 (cherry picked from commit 3440d19) Co-authored-by: Ned Batchelder <[email protected]>
1 parent 99a0668 commit 77bf973

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+118
-118
lines changed

Doc/c-api/allocation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Allocating Objects on the Heap
1414
1515
.. c:function:: PyObject* PyObject_Init(PyObject *op, PyTypeObject *type)
1616
17-
Initialize a newly-allocated object *op* with its type and initial
17+
Initialize a newly allocated object *op* with its type and initial
1818
reference. Returns the initialized object. If *type* indicates that the
1919
object participates in the cyclic garbage detector, it is added to the
2020
detector's set of observed objects. Other fields of the object are not

Doc/c-api/intro.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ A full list of the various types of debugging builds is in the file
779779
:file:`Misc/SpecialBuilds.txt` in the Python source distribution. Builds are
780780
available that support tracing of reference counts, debugging the memory
781781
allocator, or low-level profiling of the main interpreter loop. Only the most
782-
frequently-used builds will be described in the remainder of this section.
782+
frequently used builds will be described in the remainder of this section.
783783

784784
Compiling the interpreter with the :c:macro:`Py_DEBUG` macro defined produces
785785
what is generally meant by :ref:`a debug build of Python <debug-build>`.

Doc/c-api/memory.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ memory manager. For example, this is required when the interpreter is extended
7575
with new object types written in C. Another reason for using the Python heap is
7676
the desire to *inform* the Python memory manager about the memory needs of the
7777
extension module. Even when the requested memory is used exclusively for
78-
internal, highly-specific purposes, delegating all memory requests to the Python
78+
internal, highly specific purposes, delegating all memory requests to the Python
7979
memory manager causes the interpreter to have a more accurate image of its
8080
memory footprint as a whole. Consequently, under certain circumstances, the
8181
Python memory manager may or may not trigger appropriate actions, like garbage

Doc/c-api/typeobj.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ type objects) *must* have the :attr:`ob_size` field.
529529
``PyObject_HEAD_INIT`` macro. For :ref:`statically allocated objects
530530
<static-types>`, these fields always remain ``NULL``. For :ref:`dynamically
531531
allocated objects <heap-types>`, these two fields are used to link the
532-
object into a doubly-linked list of *all* live objects on the heap.
532+
object into a doubly linked list of *all* live objects on the heap.
533533

534534
This could be used for various debugging purposes; currently the only uses
535535
are the :func:`sys.getobjects` function and to print the objects that are

Doc/c-api/weakref.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ as much as it can.
3535
callable object that receives notification when *ob* is garbage collected; it
3636
should accept a single parameter, which will be the weak reference object
3737
itself. *callback* may also be ``None`` or ``NULL``. If *ob* is not a
38-
weakly-referencable object, or if *callback* is not callable, ``None``, or
38+
weakly referencable object, or if *callback* is not callable, ``None``, or
3939
``NULL``, this will return ``NULL`` and raise :exc:`TypeError`.
4040
4141
@@ -47,7 +47,7 @@ as much as it can.
4747
be a callable object that receives notification when *ob* is garbage
4848
collected; it should accept a single parameter, which will be the weak
4949
reference object itself. *callback* may also be ``None`` or ``NULL``. If *ob*
50-
is not a weakly-referencable object, or if *callback* is not callable,
50+
is not a weakly referencable object, or if *callback* is not callable,
5151
``None``, or ``NULL``, this will return ``NULL`` and raise :exc:`TypeError`.
5252
5353

Doc/distutils/apiref.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,7 @@ other utility module.
11981198
it contains certain values: see :func:`check_environ`. Raise :exc:`ValueError`
11991199
for any variables not found in either *local_vars* or ``os.environ``.
12001200

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

Doc/extending/building.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The initialization function has the signature:
1717

1818
.. c:function:: PyObject* PyInit_modulename(void)
1919
20-
It returns either a fully-initialized module, or a :c:type:`PyModuleDef`
20+
It returns either a fully initialized module, or a :c:type:`PyModuleDef`
2121
instance. See :ref:`initializing-modules` for details.
2222
2323
.. highlight:: python

Doc/extending/newtypes.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ example::
175175
}
176176

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

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

592-
And the corresponding member in the statically-declared type object::
592+
And the corresponding member in the statically declared type object::
593593

594594
static PyTypeObject TrivialType = {
595595
PyVarObject_HEAD_INIT(NULL, 0)

Doc/faq/design.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ you're too lazy to define a function.
313313

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

Doc/faq/programming.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ It's good practice if you import modules in the following order:
294294
1. standard library modules -- e.g. ``sys``, ``os``, ``getopt``, ``re``
295295
2. third-party library modules (anything installed in Python's site-packages
296296
directory) -- e.g. mx.DateTime, ZODB, PIL.Image, etc.
297-
3. locally-developed modules
297+
3. locally developed modules
298298

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

772772
A slash in the argument list of a function denotes that the parameters prior to
773773
it are positional-only. Positional-only parameters are the ones without an
774-
externally-usable name. Upon calling a function that accepts positional-only
774+
externally usable name. Upon calling a function that accepts positional-only
775775
parameters, arguments are mapped to parameters based solely on their position.
776776
For example, :func:`divmod` is a function that accepts positional-only
777777
parameters. Its documentation looks like this::

Doc/glossary.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ Glossary
532532
machines.
533533

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

Doc/howto/clinic.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ Let's dive in!
541541

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

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

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

11231123
Also, the function you are cloning from must have been previously defined
@@ -1315,7 +1315,7 @@ to specify in your subclass. Here's the current list:
13151315
there is no default, but not specifying a default may
13161316
result in an "uninitialized variable" warning. This can
13171317
easily happen when using option groups—although
1318-
properly-written code will never actually use this value,
1318+
properly written code will never actually use this value,
13191319
the variable does get passed in to the impl, and the
13201320
C compiler will complain about the "use" of the
13211321
uninitialized value. This value should always be a

Doc/howto/functional.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ further because you risk skipping a discarded element.
741741
The itertools module
742742
====================
743743

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

Doc/howto/instrumentation.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Sufficiently modern readelf can print the metadata::
123123
Arguments: 8@%rbp 8@%r12 -4@%eax
124124

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

129129

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

416416
.. code-block:: none

Doc/howto/logging.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Logging to a file
124124
^^^^^^^^^^^^^^^^^
125125

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

130130
import logging

Doc/howto/regex.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,7 @@ Additionally, you can retrieve named groups as a dictionary with
949949
>>> m.groupdict()
950950
{'first': 'Jane', 'last': 'Doe'}
951951

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

Doc/howto/urllib2.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ Openers and Handlers
420420
====================
421421

422422
When you fetch a URL you use an opener (an instance of the perhaps
423-
confusingly-named :class:`urllib.request.OpenerDirector`). Normally we have been using
423+
confusingly named :class:`urllib.request.OpenerDirector`). Normally we have been using
424424
the default opener - via ``urlopen`` - but you can create custom
425425
openers. Openers use handlers. All the "heavy lifting" is done by the
426426
handlers. Each handler knows how to open URLs for a particular URL scheme (http,

Doc/install/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ If you download a module source distribution, you can tell pretty quickly if it
6565
was packaged and distributed in the standard way, i.e. using the Distutils.
6666
First, the distribution's name and version number will be featured prominently
6767
in the name of the downloaded archive, e.g. :file:`foo-1.0.tar.gz` or
68-
:file:`widget-0.9.7.zip`. Next, the archive will unpack into a similarly-named
68+
:file:`widget-0.9.7.zip`. Next, the archive will unpack into a similarly named
6969
directory: :file:`foo-1.0` or :file:`widget-0.9.7`. Additionally, the
7070
distribution will contain a setup script :file:`setup.py`, and a file named
7171
:file:`README.txt` or possibly just :file:`README`, which should explain that

Doc/library/asynchat.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ connection requests.
125125
.. method:: async_chat.push_with_producer(producer)
126126

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

Doc/library/custominterp.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The modules described in this chapter allow writing interfaces similar to
88
Python's interactive interpreter. If you want a Python interpreter that
99
supports some special feature in addition to the Python language, you should
1010
look at the :mod:`code` module. (The :mod:`codeop` module is lower-level, used
11-
to support compiling a possibly-incomplete chunk of Python code.)
11+
to support compiling a possibly incomplete chunk of Python code.)
1212

1313
The full list of modules described in this chapter is:
1414

Doc/library/decimal.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
--------------
3232

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

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

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

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

13851385
With three arguments, compute ``(x**y) % modulo``. For the three argument
13861386
form, the following restrictions on the arguments hold:
@@ -2151,7 +2151,7 @@ Q. Is the CPython implementation fast for large numbers?
21512151
A. Yes. In the CPython and PyPy3 implementations, the C/CFFI versions of
21522152
the decimal module integrate the high speed `libmpdec
21532153
<https://www.bytereef.org/mpdecimal/doc/libmpdec/index.html>`_ library for
2154-
arbitrary precision correctly-rounded decimal floating point arithmetic [#]_.
2154+
arbitrary precision correctly rounded decimal floating point arithmetic [#]_.
21552155
``libmpdec`` uses `Karatsuba multiplication
21562156
<https://en.wikipedia.org/wiki/Karatsuba_algorithm>`_
21572157
for medium-sized numbers and the `Number Theoretic Transform

Doc/library/doctest.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -565,12 +565,12 @@ doctest decides whether actual output matches an example's expected output:
565565

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

570570
For example, an example expecting ``ValueError: 42`` will pass if the actual
571571
exception raised is ``ValueError: 3*14``, but will fail if, say, a
572572
:exc:`TypeError` is raised instead.
573-
It will also ignore any fully-qualified name included before the
573+
It will also ignore any fully qualified name included before the
574574
exception class, which can vary between implementations and versions
575575
of Python and the code/libraries in use.
576576
Hence, all three of these variations will work with the flag specified:

Doc/library/glob.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ For example, ``'[?]'`` matches the character ``'?'``.
4242
.. function:: glob(pathname, *, root_dir=None, dir_fd=None, recursive=False, \
4343
include_hidden=False)
4444

45-
Return a possibly-empty list of path names that match *pathname*, which must be
45+
Return a possibly empty list of path names that match *pathname*, which must be
4646
a string containing a path specification. *pathname* can be either absolute
4747
(like :file:`/usr/src/Python-1.5/Makefile`) or relative (like
4848
:file:`../../Tools/\*/\*.gif`), and can contain shell-style wildcards. Broken

Doc/library/hmac.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ An HMAC object has the following methods:
6969

7070
.. warning::
7171

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

8484
.. warning::
8585

86-
When comparing the output of :meth:`hexdigest` to an externally-supplied
86+
When comparing the output of :meth:`hexdigest` to an externally supplied
8787
digest during a verification routine, it is recommended to use the
8888
:func:`compare_digest` function instead of the ``==`` operator
8989
to reduce the vulnerability to timing attacks.

Doc/library/importlib.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ ABC hierarchy::
450450
reloaded):
451451

452452
- :attr:`__name__`
453-
The module's fully-qualified name.
453+
The module's fully qualified name.
454454
It is ``'__main__'`` for an executed module.
455455

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

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

@@ -899,7 +899,7 @@ find and load modules.
899899

900900
(:attr:`__name__`)
901901

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

905905
.. attribute:: loader
@@ -948,7 +948,7 @@ find and load modules.
948948

949949
(:attr:`__package__`)
950950

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

Doc/library/inspect.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ attributes:
187187
| | co_name | name with which this code |
188188
| | | object was defined |
189189
+-----------+-------------------+---------------------------+
190-
| | co_qualname | fully-qualified name with |
190+
| | co_qualname | fully qualified name with |
191191
| | | which this code object |
192192
| | | was defined |
193193
+-----------+-------------------+---------------------------+
@@ -1130,7 +1130,7 @@ Classes and functions
11301130
doesn't have its own annotations dict, returns an empty dict.
11311131
* All accesses to object members and dict values are done
11321132
using ``getattr()`` and ``dict.get()`` for safety.
1133-
* Always, always, always returns a freshly-created dict.
1133+
* Always, always, always returns a freshly created dict.
11341134

11351135
``eval_str`` controls whether or not values of type ``str`` are replaced
11361136
with the result of calling :func:`eval()` on those values:

Doc/library/mailbox.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1510,7 +1510,7 @@ The following exception classes are defined in the :mod:`mailbox` module:
15101510

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

15161516

0 commit comments

Comments
 (0)