Why is map() preferable in this case?

Ray ray_usenet at yahoo.com
Tue Sep 20 02:43:04 EDT 2005


Delaney, Timothy (Tim) wrote:
> map() will be faster if the function you are calling from map() is
> *also* in coded in C. If it's coded in python, then the generator
> expression will probably be faster.
>
> Use whatever reads better to you. Look at optimising when you need to,
> and not before.

Well, I can understand why some people prefer map(). It's shorter to
type, and after I'm used to it, it's kinda OK actually. I wonder if
BDFL is going to remove it for real in Python 3000... 

> 
> Tim Delaney




More information about the Python-list mailing list