summaryrefslogtreecommitdiffstats
path: root/Objects/dictobject.c
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2008-10-04 21:51:59 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2008-10-04 21:51:59 (GMT)
commita4127173f8da2bd7474f3ae66257b97056e85c87 (patch)
tree2045b55a26b36d8129d94760ef25ddc52055a480 /Objects/dictobject.c
parent4d164158d6829bdb0b186132e8bd611d6c517135 (diff)
downloadcpython-a4127173f8da2bd7474f3ae66257b97056e85c87.zip
cpython-a4127173f8da2bd7474f3ae66257b97056e85c87.tar.gz
cpython-a4127173f8da2bd7474f3ae66257b97056e85c87.tar.bz2
Punctuation fix; expand dict.update docstring to be clearer
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r--Objects/dictobject.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index cc083f1..f2ef4b0 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -2065,12 +2065,12 @@ PyDoc_STRVAR(setdefault_doc__,
"D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D");
PyDoc_STRVAR(pop__doc__,
-"D.pop(k[,d]) -> v, remove specified key and return the corresponding value\n\
+"D.pop(k[,d]) -> v, remove specified key and return the corresponding value.\n\
If key is not found, d is returned if given, otherwise KeyError is raised");
PyDoc_STRVAR(popitem__doc__,
"D.popitem() -> (k, v), remove and return some (key, value) pair as a\n\
-2-tuple; but raise KeyError if D is empty");
+2-tuple; but raise KeyError if D is empty.");
PyDoc_STRVAR(keys__doc__,
"D.keys() -> list of D's keys");
@@ -2082,8 +2082,10 @@ PyDoc_STRVAR(values__doc__,
"D.values() -> list of D's values");
PyDoc_STRVAR(update__doc__,
-"D.update(E, **F) -> None. Update D from E and F: for k in E: D[k] = E[k]\n\
-(if E has keys else: for (k, v) in E: D[k] = v) then: for k in F: D[k] = F[k]");
+"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\
+In either case, this is followed by: for k in F: D[k] = F[k]");
PyDoc_STRVAR(fromkeys__doc__,
"dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.\n\