evhub / coconut

Simple, elegant, Pythonic functional programming.
http://coconut-lang.org
Apache License 2.0
4.05k stars 120 forks source link

Add better pattern-matching for anonymous named tuples #847

Closed evhub closed 1 month ago

evhub commented 1 month ago

You can do

tuple(name=pattern) = (name=value)

but it won't check the length, so it's not an ideal solution.

evhub commented 1 month ago

Should also support #848 here.