In python there is this interesting, and very useful tool by which you can pattern match values from tuples on function signature.
def first((a, b)):
return a
x = (4, 9)
first(x)
li = [(5, 4), (8, 9)]
map(first, li)
def second(a, b):
# does not work the same way
return b
I don't see any literature on use of this. What is the vocabulary the python community uses for this? Is there a compelling reason to not use this?