Skip to content

Commit 5c0c6f1

Browse files
vstinnerhugovk
andauthored
Apply suggestions from code review
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parent 5e4a284 commit 5c0c6f1

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Doc/library/stdtypes.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5305,8 +5305,8 @@ frozenset, a temporary one is created from *elem*.
53055305

53065306
.. _typesmapping:
53075307

5308-
Mapping Types --- :class:`dict`, :class:`frozendict`
5309-
====================================================
5308+
Mapping types --- :class:`!dict`, :class:`!frozendict`
5309+
======================================================
53105310

53115311
.. index::
53125312
pair: object; mapping
@@ -5846,23 +5846,23 @@ An example of dictionary view usage::
58465846
Return a new frozen dictionary initialized from an optional positional
58475847
argument and a possibly empty set of keyword arguments.
58485848

5849-
A frozendict has a similar API than the :class:`dict` API, with the
5849+
A :class:`!frozendict` has a similar API than the :class:`dict` API, with the
58505850
following differences:
58515851

5852-
* :class:`dict` has more methods than :class:`frozendict`:
5852+
* :class:`!dict` has more methods than :class:`!frozendict`:
58535853

5854-
* :meth:`~!dict.__delitem__`
5855-
* :meth:`~!dict.__setitem__`
5854+
* :meth:`!__delitem__`
5855+
* :meth:`!__setitem__`
58565856
* :meth:`~dict.clear`
58575857
* :meth:`~dict.pop`
58585858
* :meth:`~dict.popitem`
58595859
* :meth:`~dict.setdefault`
58605860
* :meth:`~dict.update`
58615861

5862-
* A frozendict can be hashed with ``hash(frozendict)`` if all keys and
5862+
* A :class:`!frozendict` can be hashed with ``hash(frozendict)`` if all keys and
58635863
values can be hashed.
58645864

5865-
* ``frozendict |= other`` does not modify the frozendict in-place but
5865+
* ``frozendict |= other`` does not modify the :class:`!frozendict` in-place but
58665866
creates a new frozen dictionary.
58675867

58685868
.. versionadded:: next

Lib/test/mapping_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ def test_constructor(self):
9191
def test_bool(self):
9292
self.assertTrue(not self._empty_mapping())
9393
self.assertTrue(self.reference)
94-
self.assertTrue(bool(self._empty_mapping()) is False)
95-
self.assertTrue(bool(self.reference) is True)
94+
self.assertFalse(bool(self._empty_mapping()))
95+
self.assertTrue(bool(self.reference))
9696

9797
def test_keys(self):
9898
d = self._empty_mapping()

0 commit comments

Comments
 (0)