[Python-checkins] cpython (2.7): Cleanup a few minor things.
ezio.melotti
python-checkins at python.org
Sat Jan 5 07:54:26 CET 2013
http://hg.python.org/cpython/rev/97b24aa84df1
changeset: 81294:97b24aa84df1
branch: 2.7
parent: 81283:fdc894d44d82
user: Ezio Melotti <ezio.melotti at gmail.com>
date: Sat Jan 05 07:36:54 2013 +0200
summary:
Cleanup a few minor things.
files:
Doc/faq/design.rst | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Doc/faq/design.rst b/Doc/faq/design.rst
--- a/Doc/faq/design.rst
+++ b/Doc/faq/design.rst
@@ -225,7 +225,7 @@
generic for a group of types and which were intended to work even for objects
that didn't have methods at all (e.g. tuples). It is also convenient to have a
function that can readily be applied to an amorphous collection of objects when
-you use the functional features of Python (``map()``, ``apply()`` et al).
+you use the functional features of Python (``map()``, ``zip()`` et al).
In fact, implementing ``len()``, ``max()``, ``min()`` as a built-in function is
actually less code than implementing them as methods for each type. One can
@@ -757,7 +757,7 @@
requested again. This is called "memoizing", and can be implemented like this::
# Callers will never provide a third parameter for this function.
- def expensive (arg1, arg2, _cache={}):
+ def expensive(arg1, arg2, _cache={}):
if (arg1, arg2) in _cache:
return _cache[(arg1, arg2)]
@@ -782,7 +782,7 @@
try:
...
- if (condition): raise label() # goto label
+ if condition: raise label() # goto label
...
except label: # where to goto
pass
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list