[Python-ideas] PEP-3150
Greg Ewing
greg.ewing at canterbury.ac.nz
Fri Apr 15 02:50:16 CEST 2011
dag.odenhall at gmail.com wrote:
> One idea is to allow combining given and def:
>
> orderly = sorted(disorderly, key=getscore) given def getscore(item):
> return item.score
I think I would actually prefer the 3-line version. There's
too much important stuff going on way over on the right there.
But here's another idea:
orderly = sorted(disorderly, key = score) given:
score(item) = item.score
--
Greg
>
> --
> Dag
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
More information about the Python-ideas
mailing list