Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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, /)
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -3042,7 +3042,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~'
Expand All @@ -3052,12 +3052,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.
Expand All @@ -3084,7 +3084,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.


Expand Down Expand Up @@ -3461,7 +3461,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.

Expand Down Expand Up @@ -4420,7 +4420,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
Expand Down Expand Up @@ -4621,7 +4621,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
Expand Down Expand Up @@ -4706,7 +4706,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`.
Expand Down Expand Up @@ -6152,7 +6152,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
Expand Down Expand Up @@ -6311,7 +6311,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
Expand Down
Loading