https://github.com/python/cpython/commit/fbbd94eae374ed0392d399355134a73841742a6e
commit: fbbd94eae374ed0392d399355134a73841742a6e
branch: main
author: hu-jeff <[email protected]>
committer: StanFromIreland <[email protected]>
date: 2026-08-16T14:31:34+01:00
summary:

Fix various typos in `Doc/library/stdtypes.rst` (#155879)

Co-authored-by: Stan Ulbrych <[email protected]>

files:
M Doc/library/stdtypes.rst

diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 280a9f3b7d0751..02b47ed5ca1dde 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -706,7 +706,7 @@ A hexadecimal string takes the form::
 
    [sign] ['0x'] integer ['.' fraction] ['p' exponent]
 
-where the optional ``sign`` may by either ``+`` or ``-``, ``integer``
+where the optional ``sign`` may be either ``+`` or ``-``, ``integer``
 and ``fraction`` are strings of hexadecimal digits, and ``exponent``
 is a decimal integer with an optional leading sign.  Case is not
 significant, and there must be at least one hexadecimal digit in
@@ -1345,7 +1345,7 @@ Mutable sequence types also support the following methods:
    :no-typesetting:
 .. method:: sequence.pop(index=-1, /)
 
-   Retrieve the item at *index* and also removes it from *sequence*.
+   Retrieve the item at *index* and also remove it from *sequence*.
    By default, the last item in *sequence* is removed and returned.
 
 .. method:: bytearray.remove(value, /)
@@ -2120,7 +2120,7 @@ expression support in the :mod:`re` module).
    one character, ``False`` otherwise.  Alphabetic characters are those 
characters defined
    in the Unicode character database as "Letter", i.e., those with general 
category
    property being one of "Lm", "Lt", "Lu", "Ll", or "Lo".  Note that this is 
different
-   from the `Alphabetic property defined in the section 4.10 'Letters, 
Alphabetic, and
+   from the `Alphabetic property defined in section 4.10 'Letters, Alphabetic, 
and
    Ideographic' of the Unicode Standard
    
<https://www.unicode.org/versions/Unicode17.0.0/core-spec/chapter-4/#G91002>`__.
    For example:
@@ -3044,7 +3044,7 @@ replacement field. For example::
    '0.333333'
    >>> f'{one_third:_^+10}'
    '___+1/3___'
-   >>> >>> f'{one_third!r:_^20}'
+   >>> f'{one_third!r:_^20}'
    '___Fraction(1, 3)___'
    >>> f'{one_third = :~>10}~'
    'one_third = ~~~~~~~1/3~'
@@ -3054,12 +3054,12 @@ replacement field. For example::
 Template String Literals (t-strings)
 ------------------------------------
 
-An :dfn:`t-string` (formally a :dfn:`template string literal`) is
+A :dfn:`t-string` (formally a :dfn:`template string literal`) is
 a string literal that is prefixed with ``t`` or ``T``.
 
 These strings follow the same syntax and evaluation rules as
 :ref:`formatted string literals <stdtypes-fstrings>`,
-with for the following differences:
+with the following differences:
 
 * Rather than evaluating to a ``str`` object, template string literals evaluate
   to a :class:`string.templatelib.Template` object.
@@ -3086,7 +3086,7 @@ with for the following differences:
   The :class:`!Interpolation` instance for the expression will be created as
   normal, except that :attr:`~string.templatelib.Interpolation.conversion` will
   be set to '``r``' (:func:`repr`) by default.
-  If an explicit conversion or format specifier are provided,
+  If an explicit conversion or format specifier is provided,
   this will override the default behaviour.
 
 
@@ -3463,7 +3463,7 @@ objects.
 
    .. classmethod:: fromhex(string, /)
 
-      This :class:`bytearray` class method returns bytearray object, decoding
+      This :class:`bytearray` class method returns a bytearray object, decoding
       the given string object.  The string must contain two hexadecimal digits
       per byte, with ASCII whitespace being ignored.
 
@@ -4427,7 +4427,7 @@ the ``%`` operator (modulo).
 This is also known as the bytes *formatting* or *interpolation* operator.
 Given ``format % values`` (where *format* is a bytes object), ``%`` conversion
 specifications in *format* are replaced with zero or more elements of *values*.
-The effect is similar to using the :c:func:`sprintf` in the C language.
+The effect is similar to using the :c:func:`sprintf` function in the C 
language.
 
 If *format* requires a single argument, *values* may be a single non-tuple
 object. [5]_  Otherwise, *values* must be a tuple with exactly the number of
@@ -4628,7 +4628,7 @@ copying.
    underlying data.
 
    ``len(view)`` is equal to the length of :meth:`~memoryview.tolist`, which
-   is the nested list representation of the view. If ``view.ndim = 1``,
+   is the nested list representation of the view. If ``view.ndim == 1``,
    this is equal to the number of elements in the view.
 
    .. versionchanged:: 3.12
@@ -4713,7 +4713,7 @@ copying.
       :class:`collections.abc.Sequence`
 
    .. versionchanged:: 3.5
-      memoryviews can now be indexed with tuple of integers.
+      memoryviews can now be indexed with a tuple of integers.
 
    .. versionchanged:: 3.14
       memoryview is now a :term:`generic type`.
@@ -6182,7 +6182,7 @@ enables cleaner type hinting syntax compared to 
subscripting :class:`typing.Unio
 
    .. note::
 
-      The ``|`` operand cannot be used at runtime to define unions where one or
+      The ``|`` operator cannot be used at runtime to define unions where one 
or
       more members is a forward reference. For example, ``int | "Foo"``, where
       ``"Foo"`` is a reference to a class not yet defined, will fail at
       runtime. For unions which include forward references, present the
@@ -6341,7 +6341,7 @@ Methods
 Methods are functions that are called using the attribute notation.
 There are two flavors: :ref:`built-in methods <builtin-methods>`
 (such as :meth:`~list.append` on lists)
-and :ref:`class instance method <instance-methods>`.
+and :ref:`class instance methods <instance-methods>`.
 Built-in methods are described with the types that support them.
 
 If you access a method (a function defined in a class namespace) through an

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to