[Python-ideas] Match statement brainstorm

Sven R. Kunze srkunze at mail.de
Thu May 26 12:21:25 EDT 2016


On 26.05.2016 05:50, Ethan Furman wrote:
> I would just as soon use the switch/case keywords, with extra matching 
> oomph.  It doesn't have to match C(-like) exactly, and would be 
> immediately recognizable as to the intent (following tests are against 
> the thing in the switch portion).
>
> I think it's okay to put our own Python spin on it.

I think "test one thing against multiple conditions" is a quite abstract 
thing to do.

I would like to see some real-world use-case for this kind of syntax.


Best,
Sven


More information about the Python-ideas mailing list