[Python-checkins] cpython (2.7): Small clarification in docstring of dict.update(): the positional argument is
georg.brandl
python-checkins at python.org
Sun Dec 18 19:31:35 CET 2011
http://hg.python.org/cpython/rev/d9bb270feb58
changeset: 74046:d9bb270feb58
branch: 2.7
parent: 74036:775319cebaa3
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
@@ -2167,9 +2167,9 @@
"D.values() -> list of D's values");
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