[Python-Dev] Re: PEP 622 and variadic positional-only args

2020-07-15 Thread Guido van Rossum
On Wed, Jul 15, 2020 at 4:41 PM Oscar Benjamin wrote: > I've taken a look through PEP 622 and I've been thinking about how it > could be used with sympy. > > In principle case/match and destructuring should be useful for sympy > because sympy has a class Basic which defines a common structure for

[Python-Dev] PEP 622 and variadic positional-only args

2020-07-15 Thread Oscar Benjamin
I've taken a look through PEP 622 and I've been thinking about how it could be used with sympy. In principle case/match and destructuring should be useful for sympy because sympy has a class Basic which defines a common structure for ~1000 subclasses. There are a lot of places where it is necessar

[Python-Dev] Re: PEP 622 constant value syntax idea

2020-07-15 Thread Rhodri James
On 15/07/2020 12:37, Mohammad Foroughi via Python-Dev wrote: Hi, I had an idea regarding the pattern matching issue of comparing with a previous constant variable instead of assigning to a new local variable. I'm not sure if this has been brought up before but instead of using a symbol with th

[Python-Dev] PEP 622 constant value syntax idea

2020-07-15 Thread Mohammad Foroughi via Python-Dev
Hi, I had an idea regarding the pattern matching issue of comparing with a previous constant variable instead of assigning to a new local variable. I'm not sure if this has been brought up before but instead of using a symbol with the case statement what if we used a keyword. So for example, x =