Ticket #7 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

doubles represented as .nan

Reported by: anonymous Assigned to: xi
Priority: normal Component: pyyaml
Severity: normal Keywords:
Cc:

Description

in python2.3.5: yaml.dump(10.24) will provide .nan

the source of it lay in the python 2.3 .nan handling, it is equal to any float:

inf_value = 1e300000 nan = inf_value/inf_value

nan == 5.6 and nan = 5006.78 --> True

after i did change a line in representer.py

from: elif data == self.nan_value or data != data:

to: elif str(data) == str(self.nan_value) or data != data:

yaml.dump -- provide correct handling of floats.

thanks ....

Attachments

Change History

04/23/06 14:10:23 changed by xi

  • status changed from new to closed.
  • resolution set to fixed.

Thanks for the report and the idea for the fix. Fixed in [150].


Add/Change #7 (doubles represented as .nan)




Change Properties
Action