Something to consider in all of this is that Python floats often *don't* produce NaNs for undefined operations, but raise exceptions instead:
>>> 1.0/0.0 Traceback (most recent call last): File "<stdin>", line 1, in <module> ZeroDivisionError: float division by zero >>> math.sqrt(-1.0) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: math domain error So achieving the OP's goals would not only entail adding an integer version of NaN, but either making int arithmetic behave differently from floats, or changing the way float arithmetic behaves, to produce NaNs instead of exceptions. -- Greg _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/