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
We should remove all assertions from the codebase and replace them with raise RuntimeError or similar.
Rationale: Assertions are meant for testing purposes and with optimizations enabled (python -O) they are ignored.
This is something uncommon in Python as optimizations do almost nothing and no-one uses them, but for example in C all assertions are removed in release compilation mode. So we should get rid of them to future-proof ourselves, in case Python becomes a JIT-compiled language in the future as it's looking like with Python 3.13 and this becomes an issue.
The text was updated successfully, but these errors were encountered:
We should remove all assertions from the codebase and replace them with
raise RuntimeError
or similar.Rationale: Assertions are meant for testing purposes and with optimizations enabled (
python -O
) they are ignored.This is something uncommon in Python as optimizations do almost nothing and no-one uses them, but for example in C all assertions are removed in release compilation mode. So we should get rid of them to future-proof ourselves, in case Python becomes a JIT-compiled language in the future as it's looking like with Python 3.13 and this becomes an issue.
The text was updated successfully, but these errors were encountered: