Message61061
In Py_Initialize(), check that the locale setting for
LC_NUMERIC is "C" (and issue some sort of warning if
not, e.g. assert() that setting), as required by
section 6.22.2 of the Python 2.0 library reference.
I'd rather have my embedded interpreter exit() than
having VERY strange or even unnoticed problems with
floating point constants.
The problem I had and that triggered this request was
this:
Traceback (most recent call last):
File "cgi-bin/test.py", line 7, in ?
import random
File "./random.py", line 93, in ?
verify('NV_MAGICCONST', 1.71552776992141)
File "./random.py", line 78, in verify
raise ValueError, \
ValueError: computed value for NV_MAGICCONST deviates
too much (computed 2.82843, expected 1)
|
|
Date |
User |
Action |
Args |
2008-01-20 09:59:13 | admin | link | issue419153 messages |
2008-01-20 09:59:13 | admin | create | |
|