A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-April/052608.html below:

[Python-Dev] Re: Re: marshal

[Python-Dev] Re: Re: marshal / unmarshal [Python-Dev] Re: Re: marshal / unmarshalFredrik Lundh fredrik at pythonware.com
Sat Apr 9 18:36:48 CEST 2005
> 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> 



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4