Favorite non-python language trick?

Robert Kern rkern at ucsd.edu
Sat Jun 25 22:31:19 CEST 2005

Devan L wrote:
> But by using the builtin reduce, you need to specify a function, which
> probably slows it down more than any speed-up from the loop in C.

Not if the function is from an extension module. For some applications, 
this can be quite common.

Of course, in a Python 3000 world, nothing stops anyone from using their 
own extension module implementing map, filter, and reduce if they really 
want to. TSBOOOWTDI in the language/stdlib, but it shouldn't stop anyone 
from using other ways to do it that aren't in the stdlib if the 
tradeoffs are right for them.

Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter

More information about the Python-list mailing list