25 May
2016
25 May
'16
6:35 a.m.
On Wed, May 25, 2016 at 2:26 AM Greg Ewing
My feeling is that the patterns should look like constructors. The archetypal constructor for a mapping object is the dict display, so a pattern that matches a mapping having particular keys would be
case {"x": p, "y": q}:
This is starting to look really good to me. But if that's valid in a case statement, why not in a regular assignment? (a, b, *rest) = sequence {'x': p, 'y': q, **rest} = mapping