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

2020-07-20 Thread Rob Cliffe via Python-Dev
On 16/07/2020 08:16, Baptiste Carvello wrote: Hello, Le 15/07/2020 à 13:37, Mohammad Foroughi via Python-Dev a écrit : 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 b

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

2020-07-16 Thread Eric Nieuwland
> From: Baptiste Carvello > Subject: [Python-Dev] Re: PEP 622 constant value syntax idea > > What about simply "is", which is already a keyword? > > AFAIK "is" has no meaning as a prefix operator as of now, so hopefully > it would not make the grammar a

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

2020-07-16 Thread Baptiste Carvello
Hello, Le 15/07/2020 à 13:37, Mohammad Foroughi via Python-Dev a écrit : > 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

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

2020-07-16 Thread Tobias Kohn
Hi Mohammad, In addition to what Rhodri James has already well pointed out, here are two additional thoughts on this. At the moment, the keyword `global` is a marker to say that the respective variable is /modified/ by a function.  Your suggestion would invert that meaning and might ther

[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