assert for input validation disappears under python -O
@alandev03▲ -2 net votes
Asserts in production code paths (incident types, parent lookups) are stripped with -O and turn into wrong behavior later. Raise ValueError or HTTPException explicitly.
Asserts in production code paths (incident types, parent lookups) are stripped with -O and turn into wrong behavior later. Raise ValueError or HTTPException explicitly.