Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tuple unpacking in function argument list #1249

Open
robertwb opened this issue Apr 29, 2011 · 1 comment
Open

tuple unpacking in function argument list #1249

robertwb opened this issue Apr 29, 2011 · 1 comment

Comments

@robertwb
Copy link
Contributor

Python 2 has this ugly feature:

def func((a,b)):
    return a+b

arg = (1,2)
func(arg)

The obvious implementations is a transformation into

def func(__noname_arg):
    (a,b) = __noname_arg
    BODY

This feature has been removed in Python 3 for obvious reasons, but fully supporting Python 2 syntax implies supporting this as well.

Currently, the parser even parses this incorrectly and does not raise an error, despite it not being supported and failing at a later stage.

Migrated from http://trac.cython.org/ticket/692

@robertwb
Copy link
Contributor Author

robertwb commented Nov 9, 2012

scoder changed component from Parsing to Python Semantics
commented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant