On Wed, Jun 24, 2020 at 2:56 AM Greg Ewing <greg.ew...@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)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/F5OPRUDRCH2HS4MOPEHLLOFAQB5G5PT4/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to