On 4/20/2020 7:27 AM, Ivan Levkivskyi wrote:
On Mon, 20 Apr 2020 at 12:19, Eric V. Smith <e...@trueblade.com <mailto:e...@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

_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/DTNNPINTOEUO6EI2D3DTJZIGSXPUDAAY/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to