diff options
author | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2020-10-07 23:43:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-07 23:43:44 (GMT) |
commit | 4e0ce820586e93cfcefb16c2a3df8eaefc54cbca (patch) | |
tree | 62e95d644abcbc04dd6baedc9b3f44f42d4d974f /Objects | |
parent | 4f3c25043d651a13c41cffcee703f7d5cb677cc7 (diff) | |
download | cpython-4e0ce820586e93cfcefb16c2a3df8eaefc54cbca.zip cpython-4e0ce820586e93cfcefb16c2a3df8eaefc54cbca.tar.gz cpython-4e0ce820586e93cfcefb16c2a3df8eaefc54cbca.tar.bz2 |
Revert "bpo-26680: Incorporate is_integer in all built-in and standard library numeric types (GH-6121)" (GH-22584)
This reverts commit 58a7da9e125422323f79c4ee95ac5549989d8162.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/clinic/longobject.c.h | 20 | ||||
-rw-r--r-- | Objects/longobject.c | 14 |
2 files changed, 1 insertions, 33 deletions
diff --git a/Objects/clinic/longobject.c.h b/Objects/clinic/longobject.c.h index 16e6f7e..4bd47b1 100644 --- a/Objects/clinic/longobject.c.h +++ b/Objects/clinic/longobject.c.h @@ -121,24 +121,6 @@ exit: return return_value; } -PyDoc_STRVAR(int_is_integer__doc__, -"is_integer($self, /)\n" -"--\n" -"\n" -"Returns True for all integers."); - -#define INT_IS_INTEGER_METHODDEF \ - {"is_integer", (PyCFunction)int_is_integer, METH_NOARGS, int_is_integer__doc__}, - -static PyObject * -int_is_integer_impl(PyObject *self); - -static PyObject * -int_is_integer(PyObject *self, PyObject *Py_UNUSED(ignored)) -{ - return int_is_integer_impl(self); -} - PyDoc_STRVAR(int___sizeof____doc__, "__sizeof__($self, /)\n" "--\n" @@ -385,4 +367,4 @@ skip_optional_kwonly: exit: return return_value; } -/*[clinic end generated code: output=022614978e2fcdf3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=ea18e51af5b53591 input=a9049054013a1b77]*/ diff --git a/Objects/longobject.c b/Objects/longobject.c index bc5b49d..92514d4 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -5234,19 +5234,6 @@ int___round___impl(PyObject *self, PyObject *o_ndigits) } /*[clinic input] -int.is_integer - -Returns True for all integers. -[clinic start generated code]*/ - -static PyObject * -int_is_integer_impl(PyObject *self) -/*[clinic end generated code: output=90f8e794ce5430ef input=1c1a86957301d26d]*/ -{ - Py_RETURN_TRUE; -} - -/*[clinic input] int.__sizeof__ -> Py_ssize_t Returns size in memory, in bytes. @@ -5560,7 +5547,6 @@ static PyMethodDef long_methods[] = { {"__ceil__", long_long_meth, METH_NOARGS, "Ceiling of an Integral returns itself."}, INT___ROUND___METHODDEF - INT_IS_INTEGER_METHODDEF INT___GETNEWARGS___METHODDEF INT___FORMAT___METHODDEF INT___SIZEOF___METHODDEF |