This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients congma, mark.dickinson, rhettinger, tim.peters
Date 2021-03-15.02:53:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1615776789.21.0.172680059332.issue43475@roundup.psfhosted.org>
In-reply-to
Content
> The performance thoughts were motivated by the idea of
> making NaN a singleton: adding a check to 
> PyFloat_FromDouble would mean that almost every operation
> that produced a float would have to pass through that check.

It may suffice to move the check upstream from PyFloat_FromDouble so that float('NaN') alway produces identically the same object as math.nan.

That would handle the common cases where NaN is used for missing values or is generated from string conversions.  We don't need a bullet-proof solution, just mitigation of harm.
History
Date User Action Args
2021-03-15 02:53:09rhettingersetrecipients: + rhettinger, tim.peters, mark.dickinson, congma
2021-03-15 02:53:09rhettingersetmessageid: <1615776789.21.0.172680059332.issue43475@roundup.psfhosted.org>
2021-03-15 02:53:09rhettingerlinkissue43475 messages
2021-03-15 02:53:09rhettingercreate