[Python-checkins] cpython (3.2): Small clarification in docstring of dict.update(): the positional argument is
georg.brandl
python-checkins at python.org
Sun Dec 18 19:29:51 CET 2011
http://hg.python.org/cpython/rev/393906d020fe
changeset: 74044:393906d020fe
branch: 3.2
parent: 74042:fa5c8cf29963
user: Georg Brandl <georg at python.org>
date: Sun Dec 18 19:30:55 2011 +0100
summary:
Small clarification in docstring of dict.update(): the positional argument is not required.
files:
Objects/dictobject.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -1973,9 +1973,9 @@
2-tuple; but raise KeyError if D is empty.");
PyDoc_STRVAR(update__doc__,
-"D.update(E, **F) -> None. Update D from dict/iterable E and F.\n"
-"If E has a .keys() method, does: for k in E: D[k] = E[k]\n\
-If E lacks .keys() method, does: for (k, v) in E: D[k] = v\n\
+"D.update([E, ]**F) -> None. Update D from dict/iterable E and F.\n"
+"If E present and has a .keys() method, does: for k in E: D[k] = E[k]\n\
+If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v\n\
In either case, this is followed by: for k in F: D[k] = F[k]");
PyDoc_STRVAR(fromkeys__doc__,
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list