[Python-Dev] PyObject_RichCompareBool identity shortcut

Alexander Belopolsky alexander.belopolsky at gmail.com
Wed Apr 27 18:10:05 CEST 2011


On Wed, Apr 27, 2011 at 12:05 PM, Isaac Morland <ijmorlan at uwaterloo.ca> wrote:
..
> Of course, the definition of math.isnan cannot then be by checking its
> argument by comparison with itself - it would have to check the appropriate
> bits of the float representation.

math.isnan() is implemented in C and does not rely on float.__eq__ in any way.


More information about the Python-Dev mailing list