Couldn't they have used "case" and "capture" clauses instead?
match status:
case not_found:
return "Not found"
capture success_code:
return "Returned success code: %s" % success_code
or the "_ as x" or a myriad other ways to make capture explicit...