[Python-ideas] Suggestion: Extend integers to include iNaN

Kyle Lahnakoski klahnakoski at mozilla.com
Sun Sep 30 10:19:28 EDT 2018



On 2018-09-30 09:41, Steve Barnes wrote:
> I am roughing out such a class and some test cases which will hopefully 
> include some cases where the hoped for advantages can be realised.
>
> My thinking on bitwise operations is to do the same as arithmetic 
> operations, i.e. (anything op iNaN) = iNaN and likewise for shift 
> operations.

Steve,

While you are extending a number system, can every int be truthy, while
only iNan be falsey?  I found that behaviour more useful because
checking if there is a value is more common than checking if it is a
zero value.

Thank you


More information about the Python-ideas mailing list