[New-bugs-announce] [issue14896] plistlib handling of real datatype

Peter VG report at bugs.python.org
Thu May 24 03:16:54 CEST 2012


New submission from Peter VG <petervg at gmail.com>:

Since strings cannot reliably be converted to floats and back, plistlib should provide an option to treat the real datatype as strings/data or to use the Decimal library class. Currently, reading and then writing a real value can change its representation in the plist even if it has not been modified. For instance:

Read:
<real>0.015</real>
Written:
<real>0.014999999999999999</real>

or 

Read:
<real>0.4</real>
Written:
<real>0.40000000000000002</real>

----------
messages: 161471
nosy: pvg
priority: normal
severity: normal
status: open
title: plistlib handling of real datatype
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14896>
_______________________________________


More information about the New-bugs-announce mailing list