Do Distributables Use "-O"?

When creating a distributable, executable version of a Panda program, is Python’s “-O” parameter (or something with similar effect) applied?

(This presumably under the “use_optimized_wheels” build-option, which I believe is the default when building.)

I ask because I’m looking to salt some “assert” statements into my code in the hopes of catching an issue that’s occasionally causing a non-invertible matrix. However, I don’t want those assertions to be present in the final game, and my understanding is that this is accomplished on the command-line by passing in the “-O” parameter to the Python command.

So, is this, or an equivalent, used when building a distributable?

I believe you need to run with the -OO flag.

But it’s easy to try this, right? :slight_smile:

Noted, and thank you! :slight_smile:

That is fair–maybe I’ll do that a little later, then!

[edit] Okay, I can partially confirm the above: it looks like only the “-O” flag is required in order to remove assertions.