Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a2f9591

Browse files
committed
#16862: merge with 3.3.
2 parents 0ae3525 + 9f6a239 commit a2f9591

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

Doc/faq/design.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ The major reason is history. Functions were used for those operations that were
214214
generic for a group of types and which were intended to work even for objects
215215
that didn't have methods at all (e.g. tuples). It is also convenient to have a
216216
function 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

219219
In fact, implementing ``len()``, ``max()``, ``min()`` as a built-in function is
220220
actually less code than implementing them as methods for each type. One can
@@ -345,9 +345,6 @@ support for C.
345345

346346
Answer 2: Fortunately, there is `Stackless Python <http://www.stackless.com>`_,
347347
which 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

353350
Why 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
709706
requested 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

Comments
 (0)