W
Westley Martínez
I think I see your point -- the OP said:
--> _temp = expr
--> if _temp: return _temp
which is where you're getting
--> return _temp or None
However, most everyone ('cept you, it seems! understood that there
would be more lines of code such that if bool(expr) == False no return
is executed and the function keeps going merrily along. Like this:
--> def func():
--> var1 = something()
--> var2 = something_else('this')
--> return? var1.hobgle(var2)
--> var3 = last_resort(var1)
--> return var3.wiglat(var2)
Looking back at the whole post now, I see nothing there to concretely
make that point except the question mark on the return.
Hope this helps.
~Ethan~
The question mark makes the programmer look like he wasn't sure of what
he was doing at the time. "Hmm, should I return this object or not?"