-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always call PyNumber_Index when casting from Python to a C++ integral…
… type, also pre-3.8 (#2801) * Always call PyNumber_Index when casting from Python to a C++ integral type, also pre-3.8 * Fixed on PyPy * Simplify use of PyNumber_Index, following @rwgk's idea, and ignore warnings in >=3.8 * Reproduce mismatch between pre-3.8 and post-3.8 behavior on __index__ throwing TypeError * Fix tests on 3.6 <= Python < 3.8 * No, I don't have an uninitialized variable * Fix use of __index__ on Python 2 * Make types in test_int_convert more ~boring~ descriptive
- Loading branch information
1 parent
9ea39dc
commit 0bb8ca2
Showing
2 changed files
with
60 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters