[Python-checkins] cpython: The function name for cmath.isinf in PyArg_ParseTuple() was wrong.

brett.cannon python-checkins at python.org
Fri Jan 31 18:04:44 CET 2014


http://hg.python.org/cpython/rev/4e30f327164a
changeset:   88857:4e30f327164a
user:        Brett Cannon <brett at python.org>
date:        Fri Jan 31 12:04:36 2014 -0500
summary:
  The function name for cmath.isinf in PyArg_ParseTuple() was wrong.

files:
  Misc/NEWS             |  2 ++
  Modules/cmathmodule.c |  2 +-
  2 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -13,6 +13,8 @@
 Library
 -------
 
+- Fixed cmath.isinf's name in its argument parsing code.
+
 - Issue #20311, #20452: poll and epoll now round the timeout away from zero,
   instead of rounding towards zero, in select and selectors modules:
   select.epoll.poll(), selectors.PollSelector.poll() and
diff --git a/Modules/cmathmodule.c b/Modules/cmathmodule.c
--- a/Modules/cmathmodule.c
+++ b/Modules/cmathmodule.c
@@ -1060,7 +1060,7 @@
 cmath_isinf(PyObject *self, PyObject *args)
 {
     Py_complex z;
-    if (!PyArg_ParseTuple(args, "D:isnan", &z))
+    if (!PyArg_ParseTuple(args, "D:isinf", &z))
         return NULL;
     return PyBool_FromLong(Py_IS_INFINITY(z.real) ||
                            Py_IS_INFINITY(z.imag));

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list