A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-November/093952.html below:

[Python-Dev] decimal.py: == and != comparisons involving NaNs

[Python-Dev] decimal.py: == and != comparisons involving NaNs [Python-Dev] decimal.py: == and != comparisons involving NaNsMark Dickinson dickinsm at gmail.com
Mon Nov 9 14:08:41 CET 2009
On Mon, Nov 9, 2009 at 10:42 AM, Stefan Krah <stefan-usenet at bytereef.org> wrote:
> I can also give a decimal use case where the current behavior is problematic
> A variable initialized to a signaling NaN should always cause an exception.
>
> But this doesn't:
>
> salary = Decimal("sNaN")
> minimum_wage = 1000
> if (salary == minimum_wage):
>    print "do stuff"
> else:
>    print "do other stuff"

Hmm.  This does look suspicious.  It's possible we should be raising
for signalling nans here.  For most of what I wrote above I was thinking
of quiet nans.

Mark
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4