Skip to content

Commit 0381bad

Browse files
sobolevnvstinner
andauthored
Apply suggestions from code review
Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent 5cf437a commit 0381bad

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎Include/cpython/dictobject.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,6 @@ PyAPI_FUNC(int) PyDict_Unwatch(int watcher_id, PyObject* dict);
107107
// Create a frozendict. Create an empty dictionary if iterable is NULL.
108108
PyAPI_FUNC(PyObject*) PyFrozenDict_New(PyObject *iterable);
109109

110-
// Create a frozendict from existing `PyDictObject`.
110+
// Create a frozendict from existing dict.
111111
// Transfers existing keys and values.
112112
PyAPI_FUNC(PyObject*) PyDict_AsFrozenDictAndClear(PyObject *dict);

‎Lib/test/test_capi/test_dict.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,10 +628,10 @@ def test_dict_as_frozendict_and_clear(self):
628628

629629
class DictSubtype(dict): ...
630630

631-
d = DictSubtype({'x': 123})
631+
d = DictSubtype(x=123)
632632
f = as_frozendict(d)
633633
self.assertIs(type(f), frozendict)
634-
self.assertEqual(f, frozendict({'x': 123}))
634+
self.assertEqual(f, frozendict(x=123))
635635
self.assertIs(type(d), DictSubtype)
636636
self.assertEqual(d, DictSubtype({}))
637637

0 commit comments

Comments
 (0)