On Fri, Sep 28, 2018 at 11:32 PM Steve Barnes <[email protected]> wrote: > One of the strengths of the IEEE float, (to set against its many > weaknesses), is the presence of the magic value NaN. Not a Number, or > NaA, is especially useful in that it is a valid value in any > mathematical operation, (always returning NaN), or comparison, (always > returning False). In functional programming this is especially useful as > it allows the chain to complete after an error while retaining the fact > that an error occurred, (as we got NaN).
The inventor of "null reference" called it a billion-dollar mistake [0]. I appreciate the Zen of Python's encouragement that "errors should never pass silently." Rather than returning iNaN, I'd prefer my program raise an exception. Besides, you can use a None if you'd like. [0] https://en.wikipedia.org/wiki/Tony_Hoare _______________________________________________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
