diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-03-30 15:29:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-30 15:29:23 (GMT) |
commit | d4edfc9abffca965e76ebc5957a92031a4d6c4d4 (patch) | |
tree | d985a5ba3c7dd8ec3183014962d650724f61ece9 /Tools/clinic | |
parent | 762ec97ea68a1126b8855996c61fa8239dc9fff7 (diff) | |
download | cpython-d4edfc9abffca965e76ebc5957a92031a4d6c4d4.zip cpython-d4edfc9abffca965e76ebc5957a92031a4d6c4d4.tar.gz cpython-d4edfc9abffca965e76ebc5957a92031a4d6c4d4.tar.bz2 |
bpo-29935: Fixed error messages in the index() method of tuple, list and deque (#887)
when pass indices of wrong type.
Diffstat (limited to 'Tools/clinic')
-rwxr-xr-x | Tools/clinic/clinic.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index 1d570f1..6be0ab2 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -2670,9 +2670,9 @@ class slice_index_converter(CConverter): def converter_init(self, *, accept={int, NoneType}): if accept == {int}: - self.converter = '_PyEval_SliceIndex' + self.converter = '_PyEval_SliceIndexNotNone' elif accept == {int, NoneType}: - self.converter = '_PyEval_SliceIndexOrNone' + self.converter = '_PyEval_SliceIndex' else: fail("slice_index_converter: illegal 'accept' argument " + repr(accept)) |