Skip to content

Commit 110134d

Browse files
him2him2StanFromIreland
authored andcommitted
[3.14] Fix typos and grammar errors across documentation (GH-144709)
(cherry picked from commit 3718f4b) Co-authored-by: Ronald Eddy Jr <ronald_eddy@yahoo.com>
1 parent a7f06e3 commit 110134d

34 files changed

+71
-72
lines changed

Doc/bugs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ stability. In order to maintain this reputation, the developers would like to
99
know of any deficiencies you find in Python.
1010

1111
It can be sometimes faster to fix bugs yourself and contribute patches to
12-
Python as it streamlines the process and involves less people. Learn how to
12+
Python as it streamlines the process and involves fewer people. Learn how to
1313
:ref:`contribute <contributing-to-python>`.
1414

1515
Documentation bugs

Doc/c-api/float.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Floating-Point Objects
8080
8181
.. c:macro:: Py_INFINITY
8282
83-
This macro expands a to constant expression of type :c:expr:`double`, that
83+
This macro expands to a constant expression of type :c:expr:`double`, that
8484
represents the positive infinity.
8585
8686
On most platforms, this is equivalent to the :c:macro:`!INFINITY` macro from
@@ -89,7 +89,7 @@ Floating-Point Objects
8989
9090
.. c:macro:: Py_NAN
9191
92-
This macro expands a to constant expression of type :c:expr:`double`, that
92+
This macro expands to a constant expression of type :c:expr:`double`, that
9393
represents a quiet not-a-number (qNaN) value.
9494
9595
On most platforms, this is equivalent to the :c:macro:`!NAN` macro from

Doc/c-api/init.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ Initializing and finalizing the interpreter
431431
432432
Note that Python will do a best effort at freeing all memory allocated by the Python
433433
interpreter. Therefore, any C-Extension should make sure to correctly clean up all
434-
of the preveiously allocated PyObjects before using them in subsequent calls to
434+
of the previously allocated PyObjects before using them in subsequent calls to
435435
:c:func:`Py_Initialize`. Otherwise it could introduce vulnerabilities and incorrect
436436
behavior.
437437
@@ -1592,7 +1592,7 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
15921592
15931593
Get the current interpreter.
15941594
1595-
Issue a fatal error if there no :term:`attached thread state`.
1595+
Issue a fatal error if there is no :term:`attached thread state`.
15961596
It cannot return NULL.
15971597
15981598
.. versionadded:: 3.9
@@ -2163,7 +2163,7 @@ Python-level trace functions in previous versions.
21632163
*what* when after any bytecode is processed after which the exception becomes
21642164
set within the frame being executed. The effect of this is that as exception
21652165
propagation causes the Python stack to unwind, the callback is called upon
2166-
return to each frame as the exception propagates. Only trace functions receives
2166+
return to each frame as the exception propagates. Only trace functions receive
21672167
these events; they are not needed by the profiler.
21682168
21692169
@@ -2291,7 +2291,7 @@ Reference tracing
22912291
the tracer function is called. Return ``0`` on success. Set an exception and
22922292
return ``-1`` on error.
22932293
2294-
Not that tracer functions **must not** create Python objects inside or
2294+
Note that tracer functions **must not** create Python objects inside or
22952295
otherwise the call will be re-entrant. The tracer also **must not** clear
22962296
any existing exception or set an exception. A :term:`thread state` will be active
22972297
every time the tracer function is called.

Doc/c-api/init_config.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,9 +544,9 @@ Configuration Options
544544
545545
Visibility:
546546
547-
* Public: Can by get by :c:func:`PyConfig_Get` and set by
547+
* Public: Can be retrieved by :c:func:`PyConfig_Get` and set by
548548
:c:func:`PyConfig_Set`.
549-
* Read-only: Can by get by :c:func:`PyConfig_Get`, but cannot be set by
549+
* Read-only: Can be retrieved by :c:func:`PyConfig_Get`, but cannot be set by
550550
:c:func:`PyConfig_Set`.
551551
552552
@@ -1155,7 +1155,7 @@ PyConfig
11551155
11561156
Most ``PyConfig`` methods :ref:`preinitialize Python <c-preinit>` if needed.
11571157
In that case, the Python preinitialization configuration
1158-
(:c:type:`PyPreConfig`) in based on the :c:type:`PyConfig`. If configuration
1158+
(:c:type:`PyPreConfig`) is based on the :c:type:`PyConfig`. If configuration
11591159
fields which are in common with :c:type:`PyPreConfig` are tuned, they must
11601160
be set before calling a :c:type:`PyConfig` method:
11611161

Doc/c-api/intro.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Docstring macros
180180
General utility macros
181181
----------------------
182182

183-
The following macros common tasks not specific to Python.
183+
The following macros are for common tasks not specific to Python.
184184

185185
.. c:macro:: Py_UNUSED(arg)
186186
@@ -277,7 +277,7 @@ Assertion utilities
277277
In debug mode, and on unsupported compilers, the macro expands to a call to
278278
:c:func:`Py_FatalError`.
279279

280-
A use for ``Py_UNREACHABLE()`` is following a call a function that
280+
A use for ``Py_UNREACHABLE()`` is following a call to a function that
281281
never returns but that is not declared ``_Noreturn``.
282282

283283
If a code path is very unlikely code but can be reached under exceptional

Doc/c-api/structures.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ There are these calling conventions:
408408
409409
410410
These two constants are not used to indicate the calling convention but the
411-
binding when use with methods of classes. These may not be used for functions
411+
binding when used with methods of classes. These may not be used for functions
412412
defined for modules. At most one of these flags may be set for any given
413413
method.
414414

Doc/c-api/veryhigh.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ the same library that the Python runtime is using.
191191
objects *globals* and *locals* with the compiler flags specified by
192192
*flags*. *globals* must be a dictionary; *locals* can be any object
193193
that implements the mapping protocol. The parameter *start* specifies
194-
the start symbol and must one of the :ref:`available start symbols <start-symbols>`.
194+
the start symbol and must be one of the :ref:`available start symbols <start-symbols>`.
195195
196196
Returns the result of executing the code as a Python object, or ``NULL`` if an
197197
exception was raised.

Doc/deprecations/pending-removal-in-3.15.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Pending removal in Python 3.15
6464

6565
* :func:`~threading.RLock` will take no arguments in Python 3.15.
6666
Passing any arguments has been deprecated since Python 3.14,
67-
as the Python version does not permit any arguments,
67+
as the Python version does not permit any arguments,
6868
but the C version allows any number of positional or keyword arguments,
6969
ignoring every argument.
7070

Doc/glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1359,7 +1359,7 @@ Glossary
13591359
'email.mime.text'
13601360

13611361
race condition
1362-
A condition of a program where the its behavior
1362+
A condition of a program where the behavior
13631363
depends on the relative timing or ordering of events, particularly in
13641364
multi-threaded programs. Race conditions can lead to
13651365
:term:`non-deterministic` behavior and bugs that are difficult to

Doc/library/mailbox.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF.
10251025
.. method:: remove_flag(flag)
10261026

10271027
Unset the flag(s) specified by *flag* without changing other flags. To
1028-
remove more than one flag at a time, *flag* maybe a string of more than
1028+
remove more than one flag at a time, *flag* may be a string of more than
10291029
one character. If "info" contains experimental information rather than
10301030
flags, the current "info" is not modified.
10311031

@@ -1190,7 +1190,7 @@ When a :class:`!MaildirMessage` instance is created based upon a
11901190
.. method:: remove_flag(flag)
11911191

11921192
Unset the flag(s) specified by *flag* without changing other flags. To
1193-
remove more than one flag at a time, *flag* maybe a string of more than
1193+
remove more than one flag at a time, *flag* may be a string of more than
11941194
one character.
11951195

11961196
When an :class:`!mboxMessage` instance is created based upon a
@@ -1562,7 +1562,7 @@ When a :class:`!BabylMessage` instance is created based upon an
15621562
.. method:: remove_flag(flag)
15631563

15641564
Unset the flag(s) specified by *flag* without changing other flags. To
1565-
remove more than one flag at a time, *flag* maybe a string of more than
1565+
remove more than one flag at a time, *flag* may be a string of more than
15661566
one character.
15671567

15681568
When an :class:`!MMDFMessage` instance is created based upon a
@@ -1641,7 +1641,7 @@ The following exception classes are defined in the :mod:`!mailbox` module:
16411641

16421642
.. exception:: Error()
16431643

1644-
The based class for all other module-specific exceptions.
1644+
The base class for all other module-specific exceptions.
16451645

16461646

16471647
.. exception:: NoSuchMailboxError()
@@ -1661,7 +1661,7 @@ The following exception classes are defined in the :mod:`!mailbox` module:
16611661

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

16671667

0 commit comments

Comments
 (0)