[issue16094] Tuple extraction in a lambda isn't supported by 2to3

2020-10-23 Thread Dong-hee Na
Change by Dong-hee Na : -- resolution: -> wont fix stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue16094] Tuple extraction in a lambda isn't supported by 2to3

2020-10-22 Thread Irit Katriel
Irit Katriel added the comment: Updating the versions, but from the discussion I think this can probably be closed as "won't fix". -- nosy: +iritkatriel versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4

[issue16094] Tuple extraction in a lambda isn't supported by 2to3

2012-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: f = lambda t, c, *, _f=(lambda a, b, c: a + b + c): _f(*(unpack_tuple(2, t) + (c,))) def unpack_tuple(n, t): t = tuple(t) if len(t) n: raise ValueError('too many values to unpack (expected %d)' % (n,)) if len(t) n: raise

[issue16094] Tuple extraction in a lambda isn't supported by 2to3

2012-10-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Not pretty :-) IMO, we're better off leaving 2-to-3 without an automated conversion for this and people will just have to stop using the feature in their 2.7 code. We could add a -3 warning in Py2.7 to flag code that needs to be changed. --

[issue16094] Tuple extraction in a lambda isn't supported by 2to3

2012-10-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm not sure a semantically neutral automatic fix is possible: f = lambda (a, b), c: a + b + c # Py2.x f = lambda t, c: t[0] + t[1] + c# Py3.x The former will unpack any iterable, not just sequences: def g(): yield 'a'

[issue16094] Tuple extraction in a lambda isn't supported by 2to3

2012-09-30 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- title: Tuple extraction in lambda isn't supported with more than one argument - Tuple extraction in a lambda isn't supported by 2to3 ___ Python tracker rep...@bugs.python.org

[issue16094] Tuple extraction in a lambda isn't supported by 2to3

2012-09-30 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16094 ___ ___