On 12/4/20 12:45 PM, Daniel Moisset wrote:
case (d = a):
This is a SyntaxError, (d=a) is not a pattern.
Ah, right. I was thinking of the case when a type was specified, aka
case MyObj(d = a):
--
~Ethan~
___
Python-Dev mailing list
This is an answer to "what PEP 634 proposes":
On Fri, 4 Dec 2020 at 19:18, Jim J. Jewett wrote:
> (...)
> I'm getting a bit confused over when people mean "the PEP currently says"
> vs "the implementation probably should" vs "the PEP should additionally
> require" vs "the PEP should instead say"
On 12/4/20 11:15 AM, Jim J. Jewett wrote:
To be more specific, I'm not sure what is intended for the 2nd or 3rd case below, which
reuse a variable "bound" by the first (failed) match. Nor am I sure whether it
matters that the first match fails on the guard predicate, instead of immediately on