[Python-ideas] Disabling optimizations

Paul Moore p.f.moore at gmail.com
Fri May 23 09:20:00 CEST 2014


On 23 May 2014 02:44, Ned Batchelder <ned at nedbatchelder.com> wrote:
>  I'm happy to have optimized and non-optimized code both written to .pyc
> files, and if you are fiddling with the options like that, you should delete
> your pyc files when you change the options.

Surely the net effect of this on your original issue would be that
instead of people wondering why continue is not shown as covered,
doing a lot of debugging, realising it was an eliminated line and
moving on, you would have people wondering why continue is shown as
not covered, doing a lot of debugging, realising they forgot to delete
the pyc file, removing it, rerunning the coverage report and moving
on? I doubt that diagnosing "I forgot to remove the pyc file, and it
matters" would be much easier than the current situation. Both could
pretty easily be documented in the coverage docs.

-1 on having Python fail to distinguish pyc files that have different
user-visible behaviour that we care about.

Paul


More information about the Python-ideas mailing list