'Will a package installed with PIP run assertions?

I created a package that can be installed with PIP. I usually test adding assertions inside the code. However, because of performance issues, I used to comment them before uploading it to PIP.

I recently read an interesting post on realpython. If the user would have to add the -o parameter for my assertions not to run I agree with what I did previously, however, it is not clear to me if the package, installed with pip install <my_package> will actually have assertions disabled by default even if the user runs the python code in normal mode (would be great if so!).

Is that so? If I keep the assertions will they be removed if installed with PIP?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source