News for hackers. Stuff that matters.
Re:What’s New in Python 3.8 by geofft on Tuesday October 15, 2019 @07:36AM (#21257455)
Could just have been

    if re.match(...).matched:
But yeah, agree that Optional is what I want here.

    if let Some(m) := re.match(...)
        m.group(1)...

    m = re.match(...)
    m.group(1) # TypeError because I haven't unwrapped the Optional
In current Python, that last line sometimes throws a runtime error.

There are no comments on this comment yet.