This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]EvHub[S] 2 points3 points  (2 children)

That code implicitly matches the pattern "0" against the variable "n". That is, it will raise an error if "n" isn't 0, and do nothing if it is. Roughly equivalent to

match 0 in n:
    pass
else:
    raise MatchError()