diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-05-26 15:43:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-26 15:43:38 (GMT) |
commit | 578c3955e0222ec7b3146197467fbb0fcfae12fe (patch) | |
tree | 1314ca1eb6153feaf3fb1cae341784270ce24c32 /Modules/posixmodule.c | |
parent | 8ad052464a4e0aef9a11663b80f187087b773592 (diff) | |
download | cpython-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/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index ddff283..59ac47d 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -13903,11 +13903,6 @@ static PyObject * os_waitstatus_to_exitcode_impl(PyObject *module, PyObject *status_obj) /*[clinic end generated code: output=db50b1b0ba3c7153 input=7fe2d7fdaea3db42]*/ { - if (PyFloat_Check(status_obj)) { - PyErr_SetString(PyExc_TypeError, - "integer argument expected, got float" ); - return NULL; - } #ifndef MS_WINDOWS int status = _PyLong_AsInt(status_obj); if (status == -1 && PyErr_Occurred()) { |