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

Skip to content

Commit 9beeefb

Browse files
committed
Cleanup a few minor things.
1 parent 19cdee8 commit 9beeefb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/faq/design.rst

Lines changed: 3 additions & 3 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
@@ -707,7 +707,7 @@ of each call to the function, and return the cached value if the same value is
707707
requested 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

Comments
 (0)