There is a mistake in description of guarding patterns for match/case statement, in this section:
>>> response_code = 300
>>> match response_code:
... case int():
... if response_code > 99 and response_code < 500:
... print('Code is a valid number')
... case _:
... print('Code is an invalid number')
...
# Code is a valid number
it looks like both a typo (extra ':'), and is formatted like an if statement in the body of the case. it should be:
... case int() if response_code > 99 and response_code < 500:
... print('Code is a valid number')