Tim Peters <t...@python.org> added the comment:
Sorry, I'm just going to close this. For values of all numeric types now, `bool(x)` returns the same as `x != type(x)(0)`. Besides being backward-incompatible, making an exception for NaN would be jarringly inconsistent. Note that you don't need numpy to conveniently check for a NaN anyway; Python's math.isnan() does the same. If you want to persist, please bring it up on the python-ideas mailing list. If it gains traction there, feel free to re-open this report. ---------- nosy: +tim.peters resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44770> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com