Skip to content

Commit 2c816a8

Browse files
[3.14] Fix various typos in Doc/library/stdtypes.rst (GH-155879) (#156028)
(cherry picked from commit fbbd94e) Co-authored-by: Stan Ulbrych <stan@python.org>
1 parent 90a1f02 commit 2c816a8

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

Doc/library/stdtypes.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ A hexadecimal string takes the form::
706706

707707
[sign] ['0x'] integer ['.' fraction] ['p' exponent]
708708

709-
where the optional ``sign`` may by either ``+`` or ``-``, ``integer``
709+
where the optional ``sign`` may be either ``+`` or ``-``, ``integer``
710710
and ``fraction`` are strings of hexadecimal digits, and ``exponent``
711711
is a decimal integer with an optional leading sign. Case is not
712712
significant, and there must be at least one hexadecimal digit in
@@ -1345,7 +1345,7 @@ Mutable sequence types also support the following methods:
13451345
:no-typesetting:
13461346
.. method:: sequence.pop(index=-1, /)
13471347

1348-
Retrieve the item at *index* and also removes it from *sequence*.
1348+
Retrieve the item at *index* and also remove it from *sequence*.
13491349
By default, the last item in *sequence* is removed and returned.
13501350

13511351
.. method:: bytearray.remove(value, /)
@@ -2120,7 +2120,7 @@ expression support in the :mod:`re` module).
21202120
one character, ``False`` otherwise. Alphabetic characters are those characters defined
21212121
in the Unicode character database as "Letter", i.e., those with general category
21222122
property being one of "Lm", "Lt", "Lu", "Ll", or "Lo". Note that this is different
2123-
from the `Alphabetic property defined in the section 4.10 'Letters, Alphabetic, and
2123+
from the `Alphabetic property defined in section 4.10 'Letters, Alphabetic, and
21242124
Ideographic' of the Unicode Standard
21252125
<https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-4/#G91002>`_.
21262126
For example:
@@ -3032,7 +3032,7 @@ replacement field. For example::
30323032
'0.333333'
30333033
>>> f'{one_third:_^+10}'
30343034
'___+1/3___'
3035-
>>> >>> f'{one_third!r:_^20}'
3035+
>>> f'{one_third!r:_^20}'
30363036
'___Fraction(1, 3)___'
30373037
>>> f'{one_third = :~>10}~'
30383038
'one_third = ~~~~~~~1/3~'
@@ -3042,12 +3042,12 @@ replacement field. For example::
30423042
Template String Literals (t-strings)
30433043
------------------------------------
30443044

3045-
An :dfn:`t-string` (formally a :dfn:`template string literal`) is
3045+
A :dfn:`t-string` (formally a :dfn:`template string literal`) is
30463046
a string literal that is prefixed with ``t`` or ``T``.
30473047

30483048
These strings follow the same syntax and evaluation rules as
30493049
:ref:`formatted string literals <stdtypes-fstrings>`,
3050-
with for the following differences:
3050+
with the following differences:
30513051

30523052
* Rather than evaluating to a ``str`` object, template string literals evaluate
30533053
to a :class:`string.templatelib.Template` object.
@@ -3074,7 +3074,7 @@ with for the following differences:
30743074
The :class:`!Interpolation` instance for the expression will be created as
30753075
normal, except that :attr:`~string.templatelib.Interpolation.conversion` will
30763076
be set to '``r``' (:func:`repr`) by default.
3077-
If an explicit conversion or format specifier are provided,
3077+
If an explicit conversion or format specifier is provided,
30783078
this will override the default behaviour.
30793079

30803080

@@ -3451,7 +3451,7 @@ objects.
34513451

34523452
.. classmethod:: fromhex(string, /)
34533453

3454-
This :class:`bytearray` class method returns bytearray object, decoding
3454+
This :class:`bytearray` class method returns a bytearray object, decoding
34553455
the given string object. The string must contain two hexadecimal digits
34563456
per byte, with ASCII whitespace being ignored.
34573457

@@ -4387,7 +4387,7 @@ the ``%`` operator (modulo).
43874387
This is also known as the bytes *formatting* or *interpolation* operator.
43884388
Given ``format % values`` (where *format* is a bytes object), ``%`` conversion
43894389
specifications in *format* are replaced with zero or more elements of *values*.
4390-
The effect is similar to using the :c:func:`sprintf` in the C language.
4390+
The effect is similar to using the :c:func:`sprintf` function in the C language.
43914391

43924392
If *format* requires a single argument, *values* may be a single non-tuple
43934393
object. [5]_ Otherwise, *values* must be a tuple with exactly the number of
@@ -4587,8 +4587,8 @@ copying.
45874587
:class:`!memoryview`\s are :ref:`generic <generics>` over the type of their
45884588
underlying data.
45894589

4590-
``len(view)`` is equal to the length of :class:`~memoryview.tolist`, which
4591-
is the nested list representation of the view. If ``view.ndim = 1``,
4590+
``len(view)`` is equal to the length of :meth:`~memoryview.tolist`, which
4591+
is the nested list representation of the view. If ``view.ndim == 1``,
45924592
this is equal to the number of elements in the view.
45934593

45944594
.. versionchanged:: 3.12
@@ -4673,7 +4673,7 @@ copying.
46734673
:class:`collections.abc.Sequence`
46744674

46754675
.. versionchanged:: 3.5
4676-
memoryviews can now be indexed with tuple of integers.
4676+
memoryviews can now be indexed with a tuple of integers.
46774677

46784678
.. versionchanged:: 3.14
46794679
memoryview is now a :term:`generic type`.
@@ -6073,7 +6073,7 @@ enables cleaner type hinting syntax compared to subscripting :class:`typing.Unio
60736073

60746074
.. note::
60756075

6076-
The ``|`` operand cannot be used at runtime to define unions where one or
6076+
The ``|`` operator cannot be used at runtime to define unions where one or
60776077
more members is a forward reference. For example, ``int | "Foo"``, where
60786078
``"Foo"`` is a reference to a class not yet defined, will fail at
60796079
runtime. For unions which include forward references, present the
@@ -6232,7 +6232,7 @@ Methods
62326232
Methods are functions that are called using the attribute notation.
62336233
There are two flavors: :ref:`built-in methods <builtin-methods>`
62346234
(such as :meth:`~list.append` on lists)
6235-
and :ref:`class instance method <instance-methods>`.
6235+
and :ref:`class instance methods <instance-methods>`.
62366236
Built-in methods are described with the types that support them.
62376237

62386238
If you access a method (a function defined in a class namespace) through an

0 commit comments

Comments
 (0)