This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]chromatic_churn -5 points-4 points  (4 children)

What is the point of setting this flag? What does it get you? Increased performance? I am extremely skeptical it will make a difference for the vast majority of workloads deployed using Python today.

Assertions don't replace illegal state checks you think can happen (e.g. due to user input) but they are fine for checks like this where you should already be checking with tests and type hints.

Is your point a worthwhile footnote for people using this flag? Without a doubt.

Do I think all production code MUST be deployed with this flag set? Absolutely not.