Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Special Cases Are a Code Smell. Parent comment
Conditionals are great because they're clear and concise...
if not list: # Can't do anything with this return # or raise error if len(list) < 3: # Ditto return #ditto
There are no comments on this comment yet.
Conditionals are great because they're clear and concise...
Sure, there's more code but it's not bad code. It's just straightforward stuff that's easy to read and debug (if necessary).