[Python-Dev] functions vs methods (was Re: trunc())

Guido van Rossum guido at python.org
Sun Jan 27 22:27:49 CET 2008


On Jan 27, 2008 12:53 PM, Aahz <aahz at pythoncraft.com> wrote:
> This is why len() is not a method:
>
>     map(len, list_of_strings)

I disagree with that explanation -- I couldn't know that when I made
len() a function, because map() wasn't to become part of the language
for another 5-6 years.

My explanation is (a) I translated ABC's #x notation, and (b) I like
the way it looks better. Your explanation is at best a handy side
effect. :-)

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list