Special keyword argument lambda syntax

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Fri Mar 13 14:41:49 EDT 2009


MRAB:
>  >>> sorted(range(9), def key(n): n % 3)

I am fine with the current lambda syntax, but another possibility:
sorted(range(9), n => n % 3)

Bye,
bearophile



More information about the Python-list mailing list