3 ms·
def mom(believe_hallmark = False, mom_exists = False, mom_cares = False): if (believe_hallmark == True and mom_exists == True and mom_cares == True):
by stakkur 6y ago
def mom(believe_hallmark = False, mom_exists = False, mom_cares = False):
if (believe_hallmark == True and mom_exists == True and mom_cares == True):
print('Call Mom')
else:
print('Nah')
mom(False, True, False)
License: This code is open source.
[EDIT] I'd forgotten how poorly humor fares on HN.
- WarOnPrivacy 6y agoI suspect the highest mom-wisdom is knowing that Hallmark is full of crap. Ergo mom(False, True, True)
- tomrod 6y agoFor many environments, better performance can be found by swapping the "and" conditions with "or" conditions.
- Liron 6y ago`== True` is triggering
- therealdrag0 6y agoI have mixed feelings. I prefer “if (condition)”, but I dislike “if (!cond)”, since the exclamation looks sneaky, especially when the condition is a method call or a long variable. But I dislike the dis-symmetry of using != but not == . Programming syntax taste is hard!!
- dragonwriter 6y agoBut it's clearly Python, so it would be the very not-sneaky “not” instead of “!”.
- airstrike 6y agoI mostly downvoted for the uneven indenting TBH