diff options
author | INADA Naoki <methane@users.noreply.github.com> | 2017-02-20 13:48:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-20 13:48:10 (GMT) |
commit | 1b8df107f867fb05ff39ebee7c55f0a907e7ad5f (patch) | |
tree | 2f84490fb7551aa941f5f08f20c7b248119f767e /Objects | |
parent | c0866855d54bbbe7bcac299c4af45389efacce0b (diff) | |
download | cpython-1b8df107f867fb05ff39ebee7c55f0a907e7ad5f.zip cpython-1b8df107f867fb05ff39ebee7c55f0a907e7ad5f.tar.gz cpython-1b8df107f867fb05ff39ebee7c55f0a907e7ad5f.tar.bz2 |
bpo-24274: fix erroneous comment in dictobject.c (GH-196)
lookdict_unicode() and lookdict_unicode_nodummy() may raise exception
when key is not unicode.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/dictobject.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 5fe5272..1b1486a 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -677,7 +677,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 |