Re: PEP 622 version 2 (Structural Pattern Matching)

July 10, 2020
11 a.m.
On 10 Jul 2020, Stefano Borini <stefano.borini@gmail.com> wrote:
Just my 2 cents, I find it kind of annoying that the whole structure requires two levels of indentation to actually reach the operational code. This would be a first in python.
I would prefer an option akin to if elif elif else where each block is only one level deep.
It very much depends on how you read it. To me the proposed structure is like with <expression> as <container>: if <container> <match-op> <pattern>: … elif <container> <match-op> <pattern>: … and thus not really different
1690
Age (days ago)
1690
Last active (days ago)
0 comments
1 participants
participants (1)
-
Eric Nieuwland