[issue31599] bug in doctest when comparing - 0.0 == 0.0

Zé Vinícius report at bugs.python.org
Tue Sep 26 20:40:58 EDT 2017


Zé Vinícius added the comment:

Hi R. David Murray,

doctest compares strings, so "-0.0" is not the same as "0.0" to doctest

Thank you. That explains why "-0.0 == 0.0" is True to Python, but False to
doctest.

Cheers,
Zé

On Tue, Sep 26, 2017 at 5:35 PM, R. David Murray <report at bugs.python.org>
wrote:

>
> R. David Murray added the comment:
>
> To be clear: doctest compares strings, so "-0.0" is not the same as "0.0"
> to doctest.
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue31599>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31599>
_______________________________________


More information about the Python-bugs-list mailing list