News for hackers. Stuff that matters.
Re:What’s New in Python 3.8 by eesmith on Tuesday October 15, 2019 @06:32AM (#21257162)
I think you mean .group(0) as .group(1) can already return None:

    >>> import re
    >>> pat = re.compile("(A+)|(B+)")
    >>> m = pat.search("HUBBLE")
    >>> m.group(1) is None
    True
    >>> m.group(2)
    'BB'
    >>> m.group(0)
    'BB'
I don't see how using your proposed change would help.
Re:What’s New in Python 3.8 by est on Wednesday October 16, 2019 @01:08AM (#21267239)
I mean re.search() should always return a MatchObject, dont return None.