fixing symptoms / not problems
Some people seem to think that fixing the symptom is fixing the problem.
import random
def return_one_of(list):
return list[random.randint(0, len(list))]
def say_something():
try:
print return_one_of(["Hello World!", "Hi!", "How you doin'?"])
except:
return say_something()
say_something()
Gah!
This is obviously an example, but there are people who do this and claim to have “fixed the problem”.
Let me reiterate: the fact that your code does not raise any exceptions does NOT mean that it is not broken code!