How to show a dictionary sorted on a value within its data?

Chris Angelico rosuav at gmail.com
Thu Oct 2 23:01:48 CEST 2014


On Fri, Oct 3, 2014 at 6:06 AM, Dan Stromberg <drsalists at gmail.com> wrote:
> Anyway, pylint doesn't complain about a bare use of lambda, but it
> does complain about a map applied to a lambda or a filter applied to a
> lambda.  Pylint says they could be replaced by a list comprehension,
> with the warning "deprecated-lambda".

That's not because lambda is a poor choice, but because map() in Py2
code can often be replaced with a list comp. (And map() in Py3 code
can often be replaced by a genexp.)

ChrisA



More information about the Python-list mailing list