Skip to content

Commit 3718f4b

Browse files
authored
Fix typos and grammar errors across documentation (#144709)
1 parent cf23fcd commit 3718f4b

36 files changed

+76
-77
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
It is equivalent to the :c:macro:`!INFINITY` macro from the C11 standard
@@ -92,7 +92,7 @@ Floating-Point Objects
9292
9393
.. c:macro:: Py_NAN
9494
95-
This macro expands a to constant expression of type :c:expr:`double`, that
95+
This macro expands to a constant expression of type :c:expr:`double`, that
9696
represents a quiet not-a-number (qNaN) value.
9797
9898
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
@@ -424,7 +424,7 @@ Initializing and finalizing the interpreter
424424
425425
Note that Python will do a best effort at freeing all memory allocated by the Python
426426
interpreter. Therefore, any C-Extension should make sure to correctly clean up all
427-
of the preveiously allocated PyObjects before using them in subsequent calls to
427+
of the previously allocated PyObjects before using them in subsequent calls to
428428
:c:func:`Py_Initialize`. Otherwise it could introduce vulnerabilities and incorrect
429429
behavior.
430430
@@ -1407,7 +1407,7 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
14071407
14081408
Get the current interpreter.
14091409
1410-
Issue a fatal error if there no :term:`attached thread state`.
1410+
Issue a fatal error if there is no :term:`attached thread state`.
14111411
It cannot return NULL.
14121412
14131413
.. versionadded:: 3.9
@@ -1979,7 +1979,7 @@ Python-level trace functions in previous versions.
19791979
*what* when after any bytecode is processed after which the exception becomes
19801980
set within the frame being executed. The effect of this is that as exception
19811981
propagation causes the Python stack to unwind, the callback is called upon
1982-
return to each frame as the exception propagates. Only trace functions receives
1982+
return to each frame as the exception propagates. Only trace functions receive
19831983
these events; they are not needed by the profiler.
19841984
19851985
@@ -2119,7 +2119,7 @@ Reference tracing
21192119
the tracer function is called. Return ``0`` on success. Set an exception and
21202120
return ``-1`` on error.
21212121
2122-
Not that tracer functions **must not** create Python objects inside or
2122+
Note that tracer functions **must not** create Python objects inside or
21232123
otherwise the call will be re-entrant. The tracer also **must not** clear
21242124
any existing exception or set an exception. A :term:`thread state` will be active
21252125
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
@@ -1153,7 +1153,7 @@ PyConfig
11531153
11541154
Most ``PyConfig`` methods :ref:`preinitialize Python <c-preinit>` if needed.
11551155
In that case, the Python preinitialization configuration
1156-
(:c:type:`PyPreConfig`) in based on the :c:type:`PyConfig`. If configuration
1156+
(:c:type:`PyPreConfig`) is based on the :c:type:`PyConfig`. If configuration
11571157
fields which are in common with :c:type:`PyPreConfig` are tuned, they must
11581158
be set before calling a :c:type:`PyConfig` method:
11591159

Doc/c-api/intro.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ Docstring macros
220220
General utility macros
221221
----------------------
222222

223-
The following macros common tasks not specific to Python.
223+
The following macros are for common tasks not specific to Python.
224224

225225
.. c:macro:: Py_UNUSED(arg)
226226
@@ -317,7 +317,7 @@ Assertion utilities
317317
In debug mode, and on unsupported compilers, the macro expands to a call to
318318
:c:func:`Py_FatalError`.
319319

320-
A use for ``Py_UNREACHABLE()`` is following a call a function that
320+
A use for ``Py_UNREACHABLE()`` is following a call to a function that
321321
never returns but that is not declared ``_Noreturn``.
322322

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

Doc/c-api/module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ remove it.
752752
.. versionchanged:: 3.9
753753

754754
:c:member:`m_traverse`, :c:member:`m_clear` and :c:member:`m_free`
755-
functions are longer called before the module state is allocated.
755+
functions are no longer called before the module state is allocated.
756756

757757

758758
.. _moduledef-dynamic:

Doc/c-api/structures.rst

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

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
@@ -54,7 +54,7 @@ Pending removal in Python 3.15
5454

5555
* :func:`~threading.RLock` will take no arguments in Python 3.15.
5656
Passing any arguments has been deprecated since Python 3.14,
57-
as the Python version does not permit any arguments,
57+
as the Python version does not permit any arguments,
5858
but the C version allows any number of positional or keyword arguments,
5959
ignoring every argument.
6060

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

0 commit comments

Comments
 (0)