Functions Returning True on Success
By Eric
—
—
3 minute read
Many beginning programmers latch on to the idea of having functions return
True
if they succeed and False
if they fail so that you have code like
this:
if do_something():
# It worked!
do_some_other_stuff()
else:
logger.error("Something didn't work!")
For me, I think it was when I saw some …