[issue47121] math.isfinite() can raise exception when called on a number
Tim Peters <tim@python.org> added the comment: I'll testify that I won't volunteer one second of my time pursuing these abstract "purity" crusades ;-) `isfinite()` et alia were added to supply functions defined by current standards to work on IEEE floating-point values. People working with floats have reasonable expectations that Python will supply workalikes for industry-stand float functions. If was had to cater to all possible "numberish" types, we'd never add anything new again :-( Doing that in a principled way requires dedicated new dunder methods, and that's a high bar. That I said, I extended math.log() decades ago to work on giant integers. It was useful for real projects I was working on at the time - I was scratching my own itches. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47121> _______________________________________
participants (1)
-
Tim Peters