[Python-Dev] Re: PEP 622: Arrow for capture patterns

2020年9月08日 09:18:13 -0700

On Sat, Sep 5, 2020 at 8:31 AM Ram Rachum <[email protected]> wrote:
> case x:
> match Point(-> a, -> b):
> ...
> match -> whatever:
> do_something(whatever)
>
> I like the arrow because it's easy to imagine the value "entering" the 
> variable. What do you think?
I like this syntax.
-- 
Luciano Ramalho
| Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
| Technical Principal at ThoughtWorks
| Twitter: @ramalhoorg
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/5XALUPRONGMA2TDRGGY62GXJFVEN43D4/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to