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/052625.html below:

[Python-Dev] Re: marshal

[Python-Dev] Re: marshal / unmarshal [Python-Dev] Re: marshal / unmarshalTim Peters tim.peters at gmail.com
Sun Apr 10 19:23:32 CEST 2005
marshal shouldn't be representing doubles as decimal strings to begin
with.  All code for (de)serialing C doubles should go thru
_PyFloat_Pack8() and _PyFloat_Unpack8().  cPickle (proto >= 1) and
struct (std mode) already do; marshal is the oddball.

But as the docs (floatobject.h) for these say:

...
 * Bug:  What this does is undefined if x is a NaN or infinity.
 * Bug:  -0.0 and +0.0 produce the same string.
 */
PyAPI_FUNC(int) _PyFloat_Pack4(double x, unsigned char *p, int le);
PyAPI_FUNC(int) _PyFloat_Pack8(double x, unsigned char *p, int le);
...
 * Bug:  What this does is undefined if the string represents a NaN or
 * infinity.
 */
PyAPI_FUNC(double) _PyFloat_Unpack4(const unsigned char *p, int le);
PyAPI_FUNC(double) _PyFloat_Unpack8(const unsigned char *p, int le);
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