This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients georg.brandl, loewis, mark.dickinson, oneg, sgala
Date 2009-01-05.14:07:14
SpamBayes Score 0.017855437
Marked as misclassified No
Message-id <1231164436.78.0.749780931301.issue1672332@psf.upfronthosting.co.za>
In-reply-to
Content
The problem comes down to the platform strtod:  on some systems,
strtod sets errno to ERANGE on underflow.  The load_float function in
Modules/cPickle.c calls PyOS_ascii_strtod and then raises ValueError
if that call sets errno.

I suggest replacing the call to PyOS_ascii_strtod with a call to
PyFloat_FromString instead.  This would make cPickle behave identically
to pickle, and would also fix the problem on Windows where 1e-310 is
dumped as 0.0.  (PyFloat_FromString goes out of its way to use atof 
instead of strtod to deal with this case.)
History
Date User Action Args
2009-01-05 14:07:16mark.dickinsonsetrecipients: + mark.dickinson, loewis, georg.brandl, sgala, oneg
2009-01-05 14:07:16mark.dickinsonsetmessageid: <1231164436.78.0.749780931301.issue1672332@psf.upfronthosting.co.za>
2009-01-05 14:07:15mark.dickinsonlinkissue1672332 messages
2009-01-05 14:07:14mark.dickinsoncreate