map versus the 'for' loop

Will Ware wware-nospam at world.std.com
Sat Dec 4 19:00:56 EST 1999


Tim Peters (tim_one at email.msn.com) wrote:
> If func is None, map is much faster....
> If func is some builtin operation (like "+" or "len") spelled at least
> roughly the same way in both cases, ...
> map will usually be significantly faster

Pardon my density: I can easily see how to do this with "len", since
I can type "len" at the prompt and get a "<built-in function len>"
object back, but I can't see how to do that with "+". The best I've
been able to come up with is the lambda that you later say isn't a
good idea. How do I obtain a "<built-in function +>" object?
-- 
 - - - - - - - - - - - - - - - - - - - - - - - -
Resistance is futile. Capacitance is efficacious.
Will Ware	email:    wware @ world.std.com




More information about the Python-list mailing list