[Python-Dev] Re: Some pattern annoyance

2023-08-02 Thread Steve Holden
Hi Chris, Nice to see you on the list. While this is definitely off-topic, I trust I might be given license by the list's few remaining readers to point out that the match-case construct is for _structural_ pattern matching. As I wrote in the latest Nutshell: "Resist the temptation to use match

[Python-Dev] Re: Some pattern annoyance

2023-08-02 Thread Christian Tismer-Sperling
On 02.08.23 18:30, Paul Moore wrote: On Wed, 2 Aug 2023 at 15:24, Stephen J. Turnbull > wrote: Partly because that's where the other discussants are (the network externality is undeniably powerful), and partly (I believe) because

[Python-Dev] Re: Some pattern annoyance

2023-08-02 Thread Paul Moore
On Wed, 2 Aug 2023 at 15:24, Stephen J. Turnbull < turnbull.stephen...@u.tsukuba.ac.jp> wrote: > Partly because that's where the other discussants are (the network > externality is undeniably powerful), and partly (I believe) because > effective use of email is a skill that requires effort to

[Python-Dev] Re: Some pattern annoyance

2023-08-02 Thread Stephen J. Turnbull
Christian Tismer-Sperling writes: > I thought this list would always stay intact as an alternatice > to the web things. How sad! The list is alive. You got an immediate answer, did you not? It's just that almost all of the people who are engaged with discussion every day have found

[Python-Dev] Re: Some pattern annoyance

2023-08-02 Thread Christian Tismer-Sperling
On 02.08.23 13:23, Barry wrote: On 2 Aug 2023, at 12:03, Christian Tismer-Sperling wrote: Hi folks, I just used Structural Pattern Matching quite intensively and I'm pretty amazed of the new possibilities. But see this code, trying to implement Mark Pilgrim's regex algorithm for roman

[Python-Dev] Re: Some pattern annoyance

2023-08-02 Thread Barry
> On 2 Aug 2023, at 12:03, Christian Tismer-Sperling > wrote: > > Hi folks, > > I just used Structural Pattern Matching quite intensively and I'm > pretty amazed of the new possibilities. > > But see this code, trying to implement Mark Pilgrim's regex > algorithm for roman literals with

[Python-Dev] Some pattern annoyance

2023-08-02 Thread Christian Tismer-Sperling
Hi folks, I just used Structural Pattern Matching quite intensively and I'm pretty amazed of the new possibilities. But see this code, trying to implement Mark Pilgrim's regex algorithm for roman literals with SPM: With constants, I can write match seq: case "M", "M", "M", "M",