pythonwhat icon indicating copy to clipboard operation
pythonwhat copied to clipboard

Add a tolerance argument to has_equal_value()

Open richierocks opened this issue 6 years ago • 0 comments

Checking that two numbers are equal within a specified tolerance is currently a bit clunky and prone to error.

See this example of it being done wrong.

https://github.com/datacamp/courses-statistical-simulation-in-python/pull/106#pullrequestreview-234160761

Having a tolerance argument would save messing about writing custom equality functions.

richierocks avatar May 06 '19 19:05 richierocks