Yash Aggarwal <aggarwal.yash2...@gmail.com> added the comment:

> due to floating-point inexactness
+1 Its not easy to predict when calculated value will not be equal to expected 
theoretical value. for example math.cos(radians(90)) is something like 6e-17 
rather than 0.
Testing for this exact value would be just awkward.
assertAlmostEqual() is already there in unittest for such comparisons so it 
wouldn't be completely nonsensical to have something like APPROX

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35656>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to