3 ms·
Ah, you’re right. In many cases, I don’t want to return None when there’s no match, but for short scripts quickly tossed together, the extra few lines can be a
by jacobolus 17y ago
Ah, you’re right. In many cases, I don’t want to return None when there’s no match, but for short scripts quickly tossed together, the extra few lines can be a bit annoying.
try: re.search("`([^']*)'", caller[0]).group(1)
except: None