On Sat, Sep 29, 2018 at 09:11:41AM -0400, Richard Damon wrote: > I would think that a possibly better solution would be the creation of a > NAN type (similarĀ to NONE) that implement this sort of property. That > way the feature can be added to integers, rationals, and any other > numeric types that exist (why do just integers need this addition).
Having NAN be a seperate type wouldn't help. If x needs to be an int, it can't be a separate NAN object because that's the wrong type. If ints had a NAN value, then rationals would automatically also get a NAN value, simply by using NAN/1. That's similar to the way that the complex type automatically gets NANs, on the basis that either the real or imaginary part can be a float NAN: py> complex(1, float('nan')) (1+nanj) -- Steve _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/