SF bug #422177: Results from .pyc differs from .py

Store floats and doubles to full precision in marshal.
Test that floats read from .pyc/.pyo closely match those read from .py.
Declare PyFloat_AsString() in floatobject header file.
Add new PyFloat_AsReprString() API function.
Document the functions declared in floatobject.h.
This commit is contained in:
Tim Peters 2001-05-08 15:19:57 +00:00
parent 569c09c013
commit 72f98e9b83
4 changed files with 35 additions and 9 deletions

View file

@ -311,6 +311,12 @@ PyFloat_AsString(char *buf, PyFloatObject *v)
PyFloat_AsStringEx(buf, v, PREC_STR);
}
void
PyFloat_AsReprString(char *buf, PyFloatObject *v)
{
PyFloat_AsStringEx(buf, v, PREC_REPR);
}
/* ARGSUSED */
static int
float_print(PyFloatObject *v, FILE *fp, int flags)