Skip to content

Commit 1b8df10

Browse files
authored
bpo-24274: fix erroneous comment in dictobject.c (GH-196)
lookdict_unicode() and lookdict_unicode_nodummy() may raise exception when key is not unicode.
1 parent c086685 commit 1b8df10

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Objects/dictobject.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,8 @@ Christian Tismer.
677677
lookdict() is general-purpose, and may return DKIX_ERROR if (and only if) a
678678
comparison raises an exception.
679679
lookdict_unicode() below is specialized to string keys, comparison of which can
680-
never raise an exception; that function can never return DKIX_ERROR.
680+
never raise an exception; that function can never return DKIX_ERROR when key
681+
is string. Otherwise, it falls back to lookdict().
681682
lookdict_unicode_nodummy is further specialized for string keys that cannot be
682683
the <dummy> value.
683684
For both, when the key isn't found a DKIX_EMPTY is returned. hashpos returns

0 commit comments

Comments
 (0)