2 ms·
Python assert checking is removed when the code is run with python -O ("optimize"), so it shouldn't be used to validate user input, checking for critical condit
by 15DCFA8F 13y ago
Python assert checking is removed when the code is run with python -O ("optimize"), so it shouldn't be used to validate user input, checking for critical conditions, etc. It is just a defensive programming and debugging tool.