Hi everyone, Sorry if this was proposed already. I looked here https://www.python.org/dev/peps/pep-0622/#alternatives-for-constant-value-pa..., search for "idea to make lookup semantics the default". I saw that a few symbols like $ and ? were proposed, and I thought that maybe the annotation syntax -> could indicate a capture expression, like so: 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? Thanks, Ram.
On Sat, Sep 5, 2020 at 8:31 AM Ram Rachum
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
participants (2)
-
Luciano Ramalho
-
Ram Rachum