mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Revert "bpo-26680: Incorporate is_integer in all built-in and standard library numeric types (GH-6121)" (GH-22584)
This reverts commit 58a7da9e12.
This commit is contained in:
parent
4f3c25043d
commit
4e0ce82058
16 changed files with 24 additions and 223 deletions
|
|
@ -4138,7 +4138,6 @@ Dec_BoolFunc(mpd_isqnan)
|
|||
Dec_BoolFunc(mpd_issnan)
|
||||
Dec_BoolFunc(mpd_issigned)
|
||||
Dec_BoolFunc(mpd_iszero)
|
||||
Dec_BoolFunc(mpd_isinteger)
|
||||
|
||||
/* Boolean functions, optional context arg */
|
||||
Dec_BoolFuncVA(mpd_isnormal)
|
||||
|
|
@ -4773,7 +4772,6 @@ static PyMethodDef dec_methods [] =
|
|||
{ "is_snan", dec_mpd_issnan, METH_NOARGS, doc_is_snan },
|
||||
{ "is_signed", dec_mpd_issigned, METH_NOARGS, doc_is_signed },
|
||||
{ "is_zero", dec_mpd_iszero, METH_NOARGS, doc_is_zero },
|
||||
{ "is_integer", dec_mpd_isinteger, METH_NOARGS, doc_is_integer},
|
||||
|
||||
/* Boolean functions, optional context arg */
|
||||
{ "is_normal", (PyCFunction)(void(*)(void))dec_mpd_isnormal, METH_VARARGS|METH_KEYWORDS, doc_is_normal },
|
||||
|
|
@ -5185,7 +5183,6 @@ DecCtx_BoolFunc_NO_CTX(mpd_isqnan)
|
|||
DecCtx_BoolFunc_NO_CTX(mpd_issigned)
|
||||
DecCtx_BoolFunc_NO_CTX(mpd_issnan)
|
||||
DecCtx_BoolFunc_NO_CTX(mpd_iszero)
|
||||
DecCtx_BoolFunc_NO_CTX(mpd_isinteger)
|
||||
|
||||
static PyObject *
|
||||
ctx_iscanonical(PyObject *context UNUSED, PyObject *v)
|
||||
|
|
@ -5467,7 +5464,6 @@ static PyMethodDef context_methods [] =
|
|||
{ "is_snan", ctx_mpd_issnan, METH_O, doc_ctx_is_snan },
|
||||
{ "is_subnormal", ctx_mpd_issubnormal, METH_O, doc_ctx_is_subnormal },
|
||||
{ "is_zero", ctx_mpd_iszero, METH_O, doc_ctx_is_zero },
|
||||
{ "is_integer", ctx_mpd_isinteger, METH_O, doc_ctx_is_integer },
|
||||
|
||||
/* Functions with a single decimal argument */
|
||||
{ "_apply", PyDecContext_Apply, METH_O, NULL }, /* alias for apply */
|
||||
|
|
@ -6101,3 +6097,5 @@ PyInit__decimal(void)
|
|||
|
||||
return NULL; /* GCOV_NOT_REACHED */
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -260,11 +260,6 @@ Return True if the argument is a (positive or negative) zero and False\n\
|
|||
otherwise.\n\
|
||||
\n");
|
||||
|
||||
PyDoc_STRVAR(doc_is_integer,
|
||||
"is_integer($self, /)\n--\n\n\
|
||||
Return True if the argument is finite and integral, otherwise False.\n\
|
||||
\n");
|
||||
|
||||
PyDoc_STRVAR(doc_ln,
|
||||
"ln($self, /, context=None)\n--\n\n\
|
||||
Return the natural (base e) logarithm of the operand. The function always\n\
|
||||
|
|
@ -690,11 +685,6 @@ PyDoc_STRVAR(doc_ctx_is_zero,
|
|||
Return True if x is a zero, False otherwise.\n\
|
||||
\n");
|
||||
|
||||
PyDoc_STRVAR(doc_ctx_is_integer,
|
||||
"is_integer($self, x, /)\n--\n\n\
|
||||
+Return True if x is finite and integral, False otherwise.\n\
|
||||
+\n");
|
||||
|
||||
PyDoc_STRVAR(doc_ctx_ln,
|
||||
"ln($self, x, /)\n--\n\n\
|
||||
Return the natural (base e) logarithm of x.\n\
|
||||
|
|
@ -889,3 +879,6 @@ Convert a number to a string using scientific notation.\n\
|
|||
|
||||
|
||||
#endif /* DOCSTRINGS_H */
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue