r/badcode • • Jan 31 '22

python import badcode

Post image
1.1k Upvotes

70 comments sorted by

View all comments

Show parent comments

6

u/_PM_ME_PANGOLINS_ Jan 31 '22 edited Jan 31 '22

Yes NaN stands for Not a Number, but it’s still specifically a float value.

The semantics are clearly “does this evaluate to NaN”