3 ms·
Ah, sorry think we are talking about different things. I thought you where complaining about: if [something]: VS if [something] is True: In the case I t
by VBprogrammer 14y ago
Ah, sorry think we are talking about different things. I thought you where complaining about:
if [something]:
VS
if [something] is True:
In the case I think you are talking about I would probably agree with you that returning some non-boolean is less clean, though I would probably just use the equality operator to force a boolean result:
def foo(i):
return i == 0
- StavrosK 14y agoYep, we agree exactly. I just don't like "return i", and would rather do "return i is True" or something.