You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is just a minor issue most of the time, but using assertions for checking input variables can lead to problems for people using this package.
The problem is, that assertions are deactivated when you use the optimization parameter -O on launching python. So as an example if a user wants to optimize the interpreter/compiler for memory-efficiency, all of the assertions in this package will be ignored.
Most people don't use this optimization parameter, but I think we should be aware of this issue and maybe even enforce this for newly written code.
This is just a minor issue most of the time, but using assertions for checking input variables can lead to problems for people using this package.
The problem is, that assertions are deactivated when you use the optimization parameter
-O
on launching python. So as an example if a user wants to optimize the interpreter/compiler for memory-efficiency, all of the assertions in this package will be ignored.Most people don't use this optimization parameter, but I think we should be aware of this issue and maybe even enforce this for newly written code.
Here are some discussions on stackoverflow which can be helpful:
https://stackoverflow.com/questions/944592/best-practice-for-using-assert
https://stackoverflow.com/questions/28608385/assert-asserting-when-debug-false
https://stackoverflow.com/questions/56990925/is-this-assert-for-development-not-for-production
TLDR:
The text was updated successfully, but these errors were encountered: