[issue36637] Restrict syntax for tuple literals with one element

2019-04-15 Thread danijar
New submission from danijar : A tuple can be created with or without parentheses: a = (1, 2, 3) a = 1, 2, 3 While both are intuitive in this example, omitting the parentheses can lead to hard to find errors when there is only one element: a = (1,) a = 1, The first is clear but the second

[issue34339] Argument unpacking syntax for lambdas

2018-08-05 Thread danijar
danijar added the comment: Thank you! Closing this. -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue34339] Argument unpacking syntax for lambdas

2018-08-05 Thread danijar
New submission from danijar : It would be great to support argument unpacking for lambdas. Example: lambda x, (y, z): x + y + z instead of lambda x, y_and_z: x + y_and_z[0] + y_and_z[1] Similar unpacking syntax is available for normal functions: def foo(x, y_and_z): y, z