Daniel F Moisset
Daniel F Moisset
I was just re-reading the spec in PEP-634 and found something which I think is misspecified around this. It's essentially about literal patterns appearing as mapping keys, i.e. a pattern...
Added to python/peps#1675
As usual, I'm jumping late to the party, but here's my position on the current discussions: I appreciate Thomas providing a design rationale for his changes rather than just the...
Sorry, I missed that. So if I understand correctly from the conversation there, "as the matching proceeds, partial subpattern matches can do bindings that will persist even if the outer...
I see. I'm a bit surprised about it: I don't remember another part of Python where it's not clearly defined if some evaluation happens or not, and other related constructs...
A definition like that (no bindings happen until the whole pattern succeeds, but before the guard) would be ideal for me, but any other will probably be ok, because as...
@Tobias-Kohn , the two examples you mention are explicitly covered in the PEP already: guards specify that the binding on the pattern is made before the condition is evaluated. The...
ok, I see if I can submit a rephrase later today
I've added a sample PR (note that this is against my personal fork of python/peps) for discussion and comments. If people here like this phrasing, I can submit this upstream:...
Just as a note, I haven't moved the PR to python/peps yet because I'm sorting out some legal approval I require from my employer to contribute to open source and...