On Wed, Jun 24, 2020 at 11:09 AM Никита Соболев <n.a.sobolev@gmail.com> wrote:
Pattern matching is sooo awesome! I am really excited about this! You made me genuinely happy! Thanks for it!
The most awesome part for me is https://www.python.org/dev/peps/pep-0622/#static-checkers-specification
I will totally add a support for this in dry-python/returns.
match container:
case Success(inner):
return inner
case Failure(inner):
return 'some_default'
That's what I wanted for so long!
The second branch could be written case Failure(): return 'some_default' i.e. no need to capture a variable you don't need. -- --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-c...>