> pickle doesn't have the INF=>1.0 bug:
>
>>>> import pickle
>>>> pickle.loads(pickle.dumps(1e10000))
> ...
> ValueError: invalid literal for float(): 1.#INF
>
>>>> import cPickle
>>>> cPickle.loads(cPickle.dumps(1e10000))
> ...
> ValueError: could not convert string to float
>
>>>> import marshal
>>>> marshal.loads(marshal.dumps(1e10000))
> 1.0

should I check in a fix for this?

the code in PyFloat_FromString contains lots of trickery to deal with more or 
less
broken literals, and more or less broken C libraries.

unfortunately, and unlike most other functions with similar names, 
PyFloat_FromString
takes a Python object, not a char pointer.  would it be a good idea to add a 
variant
that takes a char*?  if so, should PyFloat_FromString use the new function, or 
are we
avoiding that kind of refactoring for speed reasons these days?

any opinions?

</F> 



_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to