16 ms·
Ugh, sorry about that. There's a couple issues here: 1. Lambda tuple args are not yet supported -- I actually didn't know that was a thing :\ -- https://github
by trotterdylan 10y ago
Ugh, sorry about that. There's a couple issues here:
1. Lambda tuple args are not yet supported -- I actually didn't know that was a thing :\ -- https://github.com/google/grumpy/issues/17 https://github.com/google/grumpy/issues/17
2. Even if that worked properly, sorted() is not yet implemented: https://github.com/google/grumpy/issues/16 https://github.com/google/grumpy/issues/16
- justinsaccount 10y agoYeah.. It also used to work with def, but it was removed in python3. You can do this in 2.7: def func((a,b)): return b mytuple = 1,2 print func(mytuple) in py3 you need def func(t): a,b = t return b Not sure if This is probably the cleaner way to write that: key=operator.itemgetter(1)
- jwillp 10y agosorted() is widely used, adding will extend coverage considerably.