
April 20, 2020
11:26 a.m.
On 4/20/2020 7:27 AM, Ivan Levkivskyi wrote:
On Mon, 20 Apr 2020 at 12:19, Eric V. Smith <eric@trueblade.com <mailto:eric@trueblade.com>> wrote:
See PEP 3113, which doesn't mention parsing. My understanding is that it was the introspection problem that drove this.
And on very rare occasions, I really miss this feature.
I migrated a lot of code to Python 3 recently and I really miss this feature in lambdas:
sorted(users, key=lambda u: (u[1].lower(), u[0]))
is IMO much uglier than
sorted(users, key=lambda (id, name): (name.lower(), id))
Yes, that's one place I miss it. Also similar usages with dict.items() key value pairs. Eric