Skip to content

Commit 4235edc

Browse files
committed
Remove double spaces and fix typo
1 parent 4187ff0 commit 4235edc

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Doc/library/stdtypes.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5517,12 +5517,12 @@ can be used interchangeably to index the same dictionary entry.
55175517
.. admonition:: Thread safety
55185518

55195519
Creating a dictionary with the :class:`dict` constructor is atomic when the
5520-
argument to it is a :class:`dict` or a :class:`tuple`. When using the
5520+
argument to it is a :class:`dict` or a :class:`tuple`. When using the
55215521
:meth:`dict.fromkeys` method, dictionary creation is atomic when the
55225522
argument is a :class:`dict`, :class:`tuple`, :class:`set` or
55235523
:class:`frozenset`.
55245524

5525-
The following operations and function are lock-free and
5525+
The following operations and functions are lock-free and
55265526
:term:`atomic <atomic operation>`.
55275527

55285528
.. code-block::
@@ -5534,8 +5534,8 @@ can be used interchangeably to index the same dictionary entry.
55345534
len(d) # dict.__len__
55355535
55365536
These operations may compare keys using :meth:`~object.__eq__`, which can
5537-
execute arbitrary Python code. During such comparisons, the dictionary may
5538-
be modified by another thread. For built-in types like :class:`str`,
5537+
execute arbitrary Python code. During such comparisons, the dictionary may
5538+
be modified by another thread. For built-in types like :class:`str`,
55395539
:class:`int`, and :class:`float`, that implement :meth:`~object.__eq__` in C,
55405540
the underlying lock is not released during comparisons and this is not a
55415541
concern.
@@ -5569,13 +5569,13 @@ can be used interchangeably to index the same dictionary entry.
55695569
d.values() # returns a new dict_values view object
55705570
d.items() # returns a new dict_items view object
55715571
5572-
The :meth:`~dict.clear` method holds the lock for its duration. Other
5572+
The :meth:`~dict.clear` method holds the lock for its duration. Other
55735573
threads cannot observe elements being removed.
55745574

5575-
The following operations lock both dictionaries. For :meth:`~dict.update`
5575+
The following operations lock both dictionaries. For :meth:`~dict.update`
55765576
and ``|=``, this applies only when the other operand is a :class:`dict`
55775577
that uses the standard dict iterator (but not subclasses that override
5578-
iteration). For equality comparison, this applies to :class:`dict` and
5578+
iteration). For equality comparison, this applies to :class:`dict` and
55795579
its subclasses:
55805580

55815581
.. code-block::
@@ -5600,7 +5600,7 @@ can be used interchangeably to index the same dictionary entry.
56005600
dict.fromkeys(a_frozenset) # locks both
56015601
56025602
When updating from a non-dict iterable, only the target dictionary is
5603-
locked. The iterable may be concurrently modified by another thread:
5603+
locked. The iterable may be concurrently modified by another thread:
56045604

56055605
.. code-block::
56065606
:class: maybe
@@ -5652,7 +5652,7 @@ can be used interchangeably to index the same dictionary entry.
56525652
process(key)
56535653
56545654
Consider external synchronization when sharing :class:`dict` instances
5655-
across threads. See :ref:`freethreading-python-howto` for more information.
5655+
across threads. See :ref:`freethreading-python-howto` for more information.
56565656

56575657

56585658
.. _dict-views:

0 commit comments

Comments
 (0)