After we covered assignment, we turn our attention to the next big thing: conditionals. The humble if statement actually has quite a few nuances—whether it’s about readability, performance, common pitfalls or rare insights, this deceivingly simple construct is at the heart of one of the most fundamental questions in software design.
Having the Best Words
Consider the statement “had I not known, I wouldn’t have come.”—it makes sense, but takes a moment to decode. Eventually, you figure out that it means I did come, because I knew something—in other words, “I knew, so I came”—but phrasing it in negative form and using past perfect for a tense make it unnecessarily complicated.

#python #software-design #if-statements

To Be, or Not to Be
1.05 GEEK