[Python-ideas] PEP 511: API for code transformers

Victor Stinner victor.stinner at gmail.com
Thu Jan 28 11:53:35 EST 2016


2016-01-28 17:50 GMT+01:00 Sven R. Kunze <srkunze at mail.de>:
> Some feedback on:
> https://www.python.org/dev/peps/pep-0511/#usage-3-disable-all-optimization
>
> Where do I put this specific piece of code (sys.set_code_transformers([]))?

It's better to use -o noopt command, but if you want to call directly
sys.set_code_transformers(), you have to call it before the first
import. Example of app.py:
--
sys.set_code_transformers([])
import module
module.main()
--


Victor


More information about the Python-ideas mailing list