News for hackers. Stuff that matters.
Re:Python idioms by steve-howard on Sunday June 12, 2011 @04:35PM (#2647335)
The rule of thumb I've read is that map is appropriate and (generally) faster when you do not need to create a lambda.
Re:Python idioms by Estragon on Sunday June 12, 2011 @04:56PM (#2647378)
That's not strictly correct. It really comes down to whether you're calling a native python function or a C extension. If it's a native python function call, it's going to be relatively slow.