[Python-Dev] pyc files, constant folding and borderline portability issues
Antoine Pitrou
solipsis at pitrou.net
Sun Mar 29 16:42:44 CEST 2009
Hello,
There are a couple of ancillary portability concerns due to optimizations which
store system-dependent results of operations between constants in pyc files:
- Issue #5057: code like '\U00012345'[0] is optimized away and its result stored
as a constant in the pyc file, but the result should be different in UCS-2 and
UCS-4 builds.
- Issue #5593: code like 1e16+2.9999 is optimized away and its result stored as
a constant (again), but the result can vary slightly depending on the internal
FPU precision.
These problems have probably been there for a long time and almost no one seems
to complain, but I thought I'd report them here just in case.
Regards
Antoine.
More information about the Python-Dev
mailing list