Skip to content

Commit ce552e2

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

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
@@ -676,7 +676,8 @@ Christian Tismer.
676676
lookdict() is general-purpose, and may return DKIX_ERROR if (and only if) a
677677
comparison raises an exception.
678678
lookdict_unicode() below is specialized to string keys, comparison of which can
679-
never raise an exception; that function can never return DKIX_ERROR.
679+
never raise an exception; that function can never return DKIX_ERROR when key
680+
is string. Otherwise, it falls back to lookdict().
680681
lookdict_unicode_nodummy is further specialized for string keys that cannot be
681682
the <dummy> value.
682683
For both, when the key isn't found a DKIX_EMPTY is returned. hashpos returns

0 commit comments

Comments
 (0)