summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/_gdbmmodule.c.h
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2020-05-26 15:43:38 (GMT)
committerGitHub <noreply@github.com>2020-05-26 15:43:38 (GMT)
commit578c3955e0222ec7b3146197467fbb0fcfae12fe (patch)
tree1314ca1eb6153feaf3fb1cae341784270ce24c32 /Modules/clinic/_gdbmmodule.c.h
parent8ad052464a4e0aef9a11663b80f187087b773592 (diff)
downloadcpython-578c3955e0222ec7b3146197467fbb0fcfae12fe.zip
cpython-578c3955e0222ec7b3146197467fbb0fcfae12fe.tar.gz
cpython-578c3955e0222ec7b3146197467fbb0fcfae12fe.tar.bz2
bpo-37999: No longer use __int__ in implicit integer conversions. (GH-15636)
Only __index__ should be used to make integer conversions lossless.
Diffstat (limited to 'Modules/clinic/_gdbmmodule.c.h')
-rw-r--r--Modules/clinic/_gdbmmodule.c.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/Modules/clinic/_gdbmmodule.c.h b/Modules/clinic/_gdbmmodule.c.h
index aa37a24..1951591 100644
--- a/Modules/clinic/_gdbmmodule.c.h
+++ b/Modules/clinic/_gdbmmodule.c.h
@@ -283,11 +283,6 @@ dbmopen(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
if (nargs < 3) {
goto skip_optional;
}
- if (PyFloat_Check(args[2])) {
- PyErr_SetString(PyExc_TypeError,
- "integer argument expected, got float" );
- goto exit;
- }
mode = _PyLong_AsInt(args[2]);
if (mode == -1 && PyErr_Occurred()) {
goto exit;
@@ -298,4 +293,4 @@ skip_optional:
exit:
return return_value;
}
-/*[clinic end generated code: output=2766471b2fa1a816 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=c9d43f42677f4efb input=a9049054013a1b77]*/