summaryrefslogtreecommitdiffstats
path: root/Tools/clinic/clinic.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-02-25 15:57:58 (GMT)
committerGitHub <noreply@github.com>2019-02-25 15:57:58 (GMT)
commit6a44f6eef3d0958d88882347190b3e2d1222c2e9 (patch)
treebb6474b1e094a672837c3333a081fa4d5d7638f2 /Tools/clinic/clinic.py
parentd90a141bb947b68601f8d1f37bc98f7b524f0e01 (diff)
downloadcpython-6a44f6eef3d0958d88882347190b3e2d1222c2e9.zip
cpython-6a44f6eef3d0958d88882347190b3e2d1222c2e9.tar.gz
cpython-6a44f6eef3d0958d88882347190b3e2d1222c2e9.tar.bz2
bpo-36048: Use __index__() instead of __int__() for implicit conversion if available. (GH-11952)
Deprecate using the __int__() method in implicit conversions of Python numbers to C integers.
Diffstat (limited to 'Tools/clinic/clinic.py')
-rwxr-xr-xTools/clinic/clinic.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py
index f4f0017..0e7ce96 100755
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -2602,6 +2602,8 @@ class bool_converter(CConverter):
def parse_arg(self, argname, argnum):
if self.format_unit == 'i':
+ # XXX PyFloat_Check can be removed after the end of the
+ # deprecation in _PyLong_FromNbIndexOrNbInt.
return """
if (PyFloat_Check({argname})) {{{{
PyErr_SetString(PyExc_TypeError,