Author Shmuel
Recipients Shmuel, docs@python
Date 2017-01-30.09:03:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1485767025.21.0.817398920861.issue29389@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-01-30 09:03:45Shmuelsetrecipients: + Shmuel, docs@python
2017-01-30 09:03:45Shmuelsetmessageid: <1485767025.21.0.817398920861.issue29389@psf.upfronthosting.co.za>
2017-01-30 09:03:45Shmuellinkissue29389 messages
2017-01-30 09:03:45Shmuelcreate