From: Georg Brandl Date: Sun, 18 Dec 2011 18:30:55 +0000 (+0100) Subject: Small clarification in docstring of dict.update(): the positional argument is not... X-Git-Tag: v2.7.3rc1~238^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6f14c330fa1fed40f6b4e3b4ed069e596212a7f7;p=python Small clarification in docstring of dict.update(): the positional argument is not required. --- diff --git a/Objects/dictobject.c b/Objects/dictobject.c index f2ebf456b4..ac99cfb18e 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -2167,9 +2167,9 @@ PyDoc_STRVAR(values__doc__, "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__,