summaryrefslogtreecommitdiffstats
path: root/Objects/dictobject.c
diff options
context:
space:
mode:
authorINADA Naoki <methane@users.noreply.github.com>2017-02-20 13:58:11 (GMT)
committerGitHub <noreply@github.com>2017-02-20 13:58:11 (GMT)
commitce552e2d5c4ff90218fb41847e8ffb1fd3ba3b2d (patch)
treead01a9c2d3153cf15b9e2f760cabefcb6e8556dc /Objects/dictobject.c
parent9a4577a4bb23888fed2cf192cf1a4c95ce5c26f8 (diff)
downloadcpython-ce552e2d5c4ff90218fb41847e8ffb1fd3ba3b2d.zip
cpython-ce552e2d5c4ff90218fb41847e8ffb1fd3ba3b2d.tar.gz
cpython-ce552e2d5c4ff90218fb41847e8ffb1fd3ba3b2d.tar.bz2
bpo-24274: fix erroneous comment in dictobject.c (GH-200)
lookdict_unicode() and lookdict_unicode_nodummy() may raise exception when key is not unicode.
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r--Objects/dictobject.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index b63b78a..a0c1977 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -676,7 +676,8 @@ Christian Tismer.
lookdict() is general-purpose, and may return DKIX_ERROR if (and only if) a
comparison raises an exception.
lookdict_unicode() below is specialized to string keys, comparison of which can
-never raise an exception; that function can never return DKIX_ERROR.
+never raise an exception; that function can never return DKIX_ERROR when key
+is string. Otherwise, it falls back to lookdict().
lookdict_unicode_nodummy is further specialized for string keys that cannot be
the <dummy> value.
For both, when the key isn't found a DKIX_EMPTY is returned. hashpos returns