On Wed, Jun 24, 2020 at 2:56 AM Greg Ewing <greg.ewing@canterbury.ac.nz> wrote:
One other thing that the PEP doesn't make clear -- is it possible
to combine '=' and ':=' to match a keyword argument with a sub
pattern and capture the result? I.e. can you write

    case Spam(foo = foo_value := Blarg()):

?

The full grammar in the Appendix makes this clear -- you can't write it like that, but you could write

    case Spam(foo=(foo_value := Blarg()):

I'll get to your other points eventually.

--
--Guido van Rossum (python.org/~guido)