]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-24274: fix erroneous comment in dictobject.c (GH-200)
authorINADA Naoki <methane@users.noreply.github.com>
Mon, 20 Feb 2017 13:58:11 +0000 (22:58 +0900)
committerGitHub <noreply@github.com>
Mon, 20 Feb 2017 13:58:11 +0000 (22:58 +0900)
lookdict_unicode() and lookdict_unicode_nodummy() may raise exception
when key is not unicode.

Objects/dictobject.c

index b63b78a337225acc043db8a660033212006fe024..a0c1977037b9e6bb78158587b21a0e3aa248d7d3 100644 (file)
@@ -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