3.1.3 Optimization Level

Another directive you might also wish to add is PythonOptimize:

  PythonOptimize On

As you probably guessed, this is the same as passing the -O flag to python. Just like using the -O flag in python, it might prevent you from debugging code during development, so you probably only want to use it on production servers.

You can use this directive to set different optimizations for each PSE instance (see section 3.1.5).