Today I Learned

2025/07/07

python

About python’s __debug__ constant: https://docs.python.org/3/library/constants.html#debug__

It’s true unless python is run in -O mode, stripping out assertions and other unoptimized code.