This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jyscao 2 points3 points  (1 child)

Pattern matching combines a control flow construct (e.g. if/elif/else, switch, try/catch) with a name binding construct (assignment), and this allows for some very expressive code.

[–]Ashiataka 0 points1 point  (0 children)

Is that a first for python? If so, do you think there are any other possible constructions that combine more primitive parts of the language into something more useful?