[Python-ideas] Match statement brainstorm

Random832 random832 at fastmail.com
Sun May 22 13:50:47 EDT 2016

On Fri, May 20, 2016, at 15:25, Jim Baker wrote:
> Agreed, if we want to support the structural pattern matching as seen in
> Haskell, Rust, or Scala, we should do the following:
>    - Raise a match error if the match is not exhaustive; an `else` clause
>    is fine for exhaustion

This is required because the analogous constructs in those languages are
expressions that return a value, and there's no reason to require it for
a python construct which is a statement.

More information about the Python-ideas mailing list