24 Oct
2020
24 Oct
'20
2 p.m.
I think that instead of dict unpacking specifically, what we need is to come up with a way to use the pattern-matching proposed in PEP 634 outside of match statements. This would make it possible to unpack any pattern. My opinion is that the walrus operator is practically waiting to support pattern-matching: if Response(status=200, json={"title": title}) := get('/posts/42'): print(title) I wrote a few more examples here: - https://mail.python.org/archives/list/python-ideas@python.org/thread/MJ7JHYK... -- Valentin