Python Forum
Why is bool(float("nan")) == True?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why is bool(float("nan")) == True?
#2
bool(float_value) is True for all float values != 0.0. nan does not equal 0.0
Reply


Messages In This Thread
RE: Why is bool(float("nan")) == True? - by deanhystad - Dec-14-2023, 04:17 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020