What is not objects in Python?

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Mon Sep 29 11:37:32 EDT 2008


George Sakkis:
> No difference in principle, just len() happens to be implemented more
> often than upper().

That's an important point. In a language that tries to be both
practical, readable, and elegant, the things that are done more may
deserve some sugar, to avoid code like this in many cases:

sorted(seq, key=lambda x:x.__len__())

Bye,
bearophile



More information about the Python-list mailing list