The docs only say that Python interpreter performs \"basic optimizations\", without going into any detail. Obviously, it\'s implementation dependent, but is there any way to
In Python 2.7, -O
has the following effect:
.pyo
__debug__
is FalseIn addition -OO
has the following effect:
To verify the effect for a different release of CPython, grep the source code for Py_OptimizeFlag
.
Link to official documentation: https://docs.python.org/2.7/tutorial/modules.html#compiled-python-files