m = re.match(...)
if m:
... do something ...
is verbose, but quite readable. Given that it's the way things have been done since forever, it's also unsurprising. if m := re.match(...):
... do something ...
Without knowing what the walrus operator is, it is not entirely clear what is going on here. := is only syntactic sugar, which is not what Python has ever been about.