Shmuel Amar added the comment:
documentation of math.isclose() signature on
https://docs.python.org/3/library/math.html#math.isclose is as follows:
math.isclose(a, b, *, rel_tol=1e-09, abs_tol=0.0)
the third star '*' argument is not allowed inside the function:
https://hg.python.org/cpython/file/tip/Modules/clinic/mathmodule.c.h#l511
or mentioned in PEP485 here:
https://www.python.org/dev/peps/pep-0485/#implementation
and does not work when trying provide more than 2 positional values:
>>> import math
>>> math.isclose(1,2,3, rel_tol=5.)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: Function takes at most 2 positional arguments (3 given)
So IMHO to solve this remove the positional argument on the signature of
isclose() as it misleading.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue29389>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com