summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2006-08-26 20:49:04 (GMT)
committerGuido van Rossum <guido@python.org>2006-08-26 20:49:04 (GMT)
commit0919a1a07b061ef9a8a94cc1d92c1895b00967cb (patch)
tree812681b0b579aa36b1117b192c016b7f90ada6b0 /Misc
parent6a2a2a08329567ea41f4f073cb43e487f83872c7 (diff)
downloadcpython-0919a1a07b061ef9a8a94cc1d92c1895b00967cb.zip
cpython-0919a1a07b061ef9a8a94cc1d92c1895b00967cb.tar.gz
cpython-0919a1a07b061ef9a8a94cc1d92c1895b00967cb.tar.bz2
Part of SF patch #1513870 (the still relevant part) -- add reduce() to
functools, and adjust docs etc.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/Vim/python.vim2
-rw-r--r--Misc/cheatsheet7
-rw-r--r--Misc/python-mode.el2
3 files changed, 3 insertions, 8 deletions
diff --git a/Misc/Vim/python.vim b/Misc/Vim/python.vim
index d83572a..08c54d2 100644
--- a/Misc/Vim/python.vim
+++ b/Misc/Vim/python.vim
@@ -63,7 +63,7 @@ endif
if exists("python_highlight_builtins")
syn keyword pythonBuiltin unichr all set abs vars int __import__ unicode
- syn keyword pythonBuiltin enumerate reduce exit issubclass
+ syn keyword pythonBuiltin enumerate exit issubclass
syn keyword pythonBuiltin divmod file Ellipsis isinstance open any
syn keyword pythonBuiltin locals help filter basestring slice copyright min
syn keyword pythonBuiltin super sum tuple hex execfile long id chr
diff --git a/Misc/cheatsheet b/Misc/cheatsheet
index 65b1400..bab109a 100644
--- a/Misc/cheatsheet
+++ b/Misc/cheatsheet
@@ -901,7 +901,7 @@ lambda [param_list]: returnedExpr
-- Creates an anonymous function. returnedExpr must be
an expression, not a statement (e.g., not "if xx:...",
"print xxx", etc.) and thus can't contain newlines.
- Used mostly for filter(), map(), reduce() functions, and GUI callbacks..
+ Used mostly for filter(), map() functions, and GUI callbacks..
List comprehensions
result = [expression for item1 in sequence1 [if condition1]
[for item2 in sequence2 ... for itemN in sequenceN]
@@ -1005,11 +1005,6 @@ property() Created a property with access controlled by functions.
range(start [,end Returns list of ints from >= start and < end.With 1 arg,
[, step]]) list from 0..arg-1With 2 args, list from start..end-1With 3
args, list from start up to end by step
-reduce(f, list [, Applies the binary function f to the items oflist so as to
-init]) reduce the list to a single value.If init given, it is
- "prepended" to list.
- Re-parses and re-initializes an already imported module.
- Useful in interactive mode, if you want to reload amodule
reload(module) after fixing it. If module was syntacticallycorrect but had
an error in initialization, mustimport it one more time
before calling reload().
diff --git a/Misc/python-mode.el b/Misc/python-mode.el
index 1392c84..5f50da8 100644
--- a/Misc/python-mode.el
+++ b/Misc/python-mode.el
@@ -386,7 +386,7 @@ support for features needed by `python-mode'.")
"isinstance" "issubclass" "iter" "len" "license"
"list" "locals" "long" "map" "max" "min" "object"
"oct" "open" "ord" "pow" "property" "range"
- "reduce" "reload" "repr" "round"
+ "reload" "repr" "round"
"setattr" "slice" "staticmethod" "str" "sum"
"super" "tuple" "type" "unichr" "unicode" "vars"
"zip")