+ and * operators

Nathan Froyd froydnj at rose-hulman.edu
Sun May 7 15:17:19 EDT 2000


In article <3915B949.46649689 at stud.ntnu.no>, Peter Schneider-Kamp wrote:
>Is there some way to refer to the + and *
>operators as functions?

import operator

>reduce(+,map(*,v))

reduce(operator.add, map(operator.mul, v))
-- 
</nathan>  froydnj at rose-hulman.edu  |  http://www.rose-hulman.edu/~froydnj/



More information about the Python-list mailing list