substituting list comprehensions for map()

Ben Finney ben+python at benfinney.id.au
Wed Nov 4 07:08:54 EST 2009


Steven D'Aprano <steven at REMOVE.THIS.cybersource.com.au> writes:

> On Tue, 03 Nov 2009 22:43:45 -0600, Robert Kern wrote:
> > from numpy import dot
> > 
> > scalar = dot(vec1, vec2)
>
> Why would I want to use an already existing library that is fast,
> well- written and well-supported, when I can toss together a nasty
> kludge myself?

Because using that library will ensure you can't migrate to Python 3 any
time soon?

*rimshot*

-- 
 \          “… a Microsoft Certified System Engineer is to information |
  `\     technology as a McDonalds Certified Food Specialist is to the |
_o__)                               culinary arts.” —Michael Bacarella |
Ben Finney



More information about the Python-list mailing list