@@ -214,7 +214,7 @@ The major reason is history. Functions were used for those operations that were
214214generic for a group of types and which were intended to work even for objects
215215that didn't have methods at all (e.g. tuples). It is also convenient to have a
216216function that can readily be applied to an amorphous collection of objects when
217- you use the functional features of Python (``map() ``, ``apply () `` et al).
217+ you use the functional features of Python (``map() ``, ``zip () `` et al).
218218
219219In fact, implementing ``len() ``, ``max() ``, ``min() `` as a built-in function is
220220actually less code than implementing them as methods for each type. One can
@@ -707,7 +707,7 @@ of each call to the function, and return the cached value if the same value is
707707requested again. This is called "memoizing", and can be implemented like this::
708708
709709 # Callers will never provide a third parameter for this function.
710- def expensive (arg1, arg2, _cache={}):
710+ def expensive(arg1, arg2, _cache={}):
711711 if (arg1, arg2) in _cache:
712712 return _cache[(arg1, arg2)]
713713
@@ -732,7 +732,7 @@ languages. For example::
732732
733733 try:
734734 ...
735- if ( condition) : raise label() # goto label
735+ if condition: raise label() # goto label
736736 ...
737737 except label: # where to goto
738738 pass
0 commit comments