I'm running a python script from inside a different software (it provides a python interface to manipulate its data structures).
I'm optimizing my code for speed and would like to see what impact on performance my asserts have.
I'm unable to use python -O
. What other options do I have, to programatically disable all asserts in python code? The variable __debug__
(which is cleared by -O
flag) cannot be assigned to :(