Fix markup.

This commit is contained in:
Raymond Hettinger 2010-01-25 19:20:30 +00:00
parent dd62b4d049
commit c1bb12a5ea
1 changed files with 1 additions and 1 deletions

View File

@ -760,7 +760,7 @@ which incur interpreter overhead.
Note, many of the above recipes can be optimized by replacing global lookups Note, many of the above recipes can be optimized by replacing global lookups
with local variables defined as default values. For example, the with local variables defined as default values. For example, the
*dotproduct* recipe can be written as: *dotproduct* recipe can be written as::
def dotproduct(vec1, vec2, sum=sum, imap=imap, mul=operator.mul): def dotproduct(vec1, vec2, sum=sum, imap=imap, mul=operator.mul):
return sum(imap(mul, vec1, vec2)) return sum(imap(mul, vec1, vec2))