The removal of tuple unpacking is discussed in PEP 3113. Basically, you can’t do this in Python 3. Under the headline Transition plan, you see that the “suggested” way of doing this is as your final code block:
lambda x_y: x_y[0] + x_y[1]
More Related Contents:
- how to unpack a tuple in this form (‘abc’, [20, 20])? [closed]
- How are tuples unpacked in for loops?
- Python: calling ‘list’ on a map object twice
- Two variables in Python have same id, but not lists or tuples
- List comprehension and lambdas in Python [duplicate]
- What does *tuple and **dict mean in Python? [duplicate]
- Python lambda does not accept tuple argument [duplicate]
- Why do parentheses in a lambda function cause syntax error on Python 3? [duplicate]
- Sort a list of tuples depending on two elements [duplicate]
- How to use await in a python lambda
- How does str.startswith really work?
- Nested lambda statements when sorting lists
- Converting string to tuple without splitting characters
- Code to calculate file compression on python [closed]
- “:=” syntax and assignment expressions: what and why?
- How to convert ‘binary string’ to normal string in Python3?
- Python, HTTPS GET with basic authentication
- Conditionally fill column values based on another columns value in pandas
- Python – TypeError: ‘int’ object is not iterable
- How can I get 2.x-like sorting behaviour in Python 3.x?
- How to redirect with post data (Django)
- How to make a custom object iterable?
- Basemap import error in PyCharm — KeyError: ‘PROJ_LIB’
- Discord.py error: TypeError: __new__() got an unexpected keyword argument ‘deny_new’
- How to enable Pan and Zoom in a QGraphicsView
- Python dictionary replace values
- TypeError: attack() missing 1 required positional argument: ‘self’
- .pyw files in python program
- How to use sys.exit() in Python
- Removing an item from a list of lists based on each of the lists first element