Author: mattip <matti.pi...@gmail.com> Branch: cpyext-ext Changeset: r82676:4d2743ceeb86 Date: 2016-03-03 02:24 -0500 http://bitbucket.org/pypy/pypy/changeset/4d2743ceeb86/
Log: PyNumber_Check accepts int as well as float diff --git a/pypy/module/cpyext/number.py b/pypy/module/cpyext/number.py --- a/pypy/module/cpyext/number.py +++ b/pypy/module/cpyext/number.py @@ -24,7 +24,13 @@ space.float_w(w_obj) return 1 except OperationError: - return 0 + pass + try: + space.int_w(w_obj) + return 1 + except OperationError: + pass + return 0 @cpython_api([PyObject, PyObject], Py_ssize_t, error=-1) def PyNumber_AsSsize_t(space, w_obj, w_exc): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit