@@ -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
@@ -345,9 +345,6 @@ support for C.
345345
346346Answer 2: Fortunately, there is `Stackless Python <http://www.stackless.com >`_,
347347which has a completely redesigned interpreter loop that avoids the C stack.
348- It's still experimental but looks very promising. Although it is binary
349- compatible with standard Python, it's still unclear whether Stackless will make
350- it into the core -- maybe it's just too revolutionary.
351348
352349
353350Why can't lambda forms contain statements?
@@ -709,7 +706,7 @@ of each call to the function, and return the cached value if the same value is
709706requested again. This is called "memoizing", and can be implemented like this::
710707
711708 # Callers will never provide a third parameter for this function.
712- def expensive (arg1, arg2, _cache={}):
709+ def expensive(arg1, arg2, _cache={}):
713710 if (arg1, arg2) in _cache:
714711 return _cache[(arg1, arg2)]
715712
@@ -734,7 +731,7 @@ languages. For example::
734731
735732 try:
736733 ...
737- if ( condition) : raise label() # goto label
734+ if condition: raise label() # goto label
738735 ...
739736 except label: # where to goto
740737 pass
0 commit comments