Modify

Ticket #7 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

doubles represented as .nan

Reported by: anonymous Owned by: 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

comment:1 Changed 8 years ago 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].

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.