[issue6567] Make inf be almost equal to inf

Lucas Prado Melo report at bugs.python.org
Sat Jul 25 14:56:53 CEST 2009


Lucas Prado Melo <lucaspradomelo at gmail.com> added the comment:

I would like to ask as a feature request that "inf" be almost equal to
"inf".
I wrote a program with a timeline class that had a method to tell the
time of the last event registered into it such that some events would be
positioned at the infinite when they wouldn't occur. I did generic tests
that would receive any output from this method and compare to the
expected result through unittest.TestCase.assertAlmostEqual(). Notice,
though, that I couldn't just pick assertEqual() to do this job because
the time of the last event would be defined through a series of
calculations.
Despite that, I believe that everything which is equal to anything else
would definitely be almost equal too. Thus, it would be nice to check
for equality before checking for almost-equality to define whether two
objects are almost equal.

----------
status: closed -> open
title: Isn't inf  almost equal to inf? -> Make inf be almost equal to inf
type: behavior -> feature request

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6567>
_______________________________________


More information about the Python-bugs-list mailing list