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 ValueError('need more than %d values to unpack' % (len(t),))
return t
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue16094>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com