[Python-ideas] Disabling optimizations
Eric Snow
ericsnowcurrently at gmail.com
Fri May 23 19:11:59 CEST 2014
On Fri, May 23, 2014 at 6:04 AM, Ned Batchelder <ned at nedbatchelder.com> wrote:
> The .pyc file already has a metadata that indicates the source timestamp and
> the version of the Python interpreter. If those numbers don't mesh well
> with the Python source and interpreter that finds the pyc file, then the
> file is discarded transparently. We could put the compilation options into
> the pyc file as well, and automatically discard the file if it had been made
> with different options than the running interpreter.
Adjusting the cache tag (sys.implementation.cache_tag) to reflect the
optimization level would be pretty straight-forward and relatively
easy. I'd like that better than putting that information into the
.pyc header.
-eric
More information about the Python-ideas
mailing list