[Python-ideas] PEP 485: A Function for testing approximate equality

Ryan Gonzalez rymg19 at gmail.com
Mon Feb 16 23:57:45 CET 2015


Doesn't Python already have this with unittest.TestCase.assertAlmostEqual
<https://docs.python.org/3.4/library/unittest.html#unittest.TestCase.assertAlmostEqual>
?


On Sat, Feb 14, 2015 at 7:26 AM, Victor Stinner <victor.stinner at gmail.com>
wrote:

> Hi,
>
> Do you propose a builtin function? I would prefer to put it in the math
> module.
>
> You may add a new method to unittest.TestCase? It would show all
> parameters on error. .assertTrue(isclose(...)) doesn't help on error.
>
> Victor
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>



-- 
Ryan
If anybody ever asks me why I prefer C++ to C, my answer will be simple:
"It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was
nul-terminated."
Personal reality distortion fields are immune to contradictory evidence. -
srean
Check out my website: http://kirbyfan64.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150216/5f50e2a0/attachment-0001.html>


More information about the Python-ideas mailing list