Search code examples
pythonpython-3.xtuplesiterable-unpacking

why tuple assignment in function arguments doesn't work in python3


In Python3 the following code doesn't work anymore:

def function((a, (b, c))):
  pass

Why was it removed? What's the reason?


Solution

  • You can find the answer by reading PEP 3113. In short words: There were more troubles in keeping the tuple parameter unpacking than removing it.