Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on PEP 572: Python assignment expressions has been accepted. Parent comment
re.match shouldn't return None at all. I often write helper functions like:
matcher = lambda r, s: getattr(re.match(r, s), 'group', lambda i: '') o = matcher(r1, s)(1) or matcher(r2, s)(3)
There are no comments on this comment yet.
re.match shouldn't return None at all. I often write helper functions like:
here matcher have a fixed, static return type, string.