Skip to content

Commit f37ac53

Browse files
miss-islingtonPrometheus3375AA-Turner
authored
[3.13] gh-116938: Fix dict.update docstring and remove erraneous full stop from dict documentation (GH-125421) (#126150)
gh-116938: Fix `dict.update` docstring and remove erraneous full stop from `dict` documentation (GH-125421) (cherry picked from commit 5527c40) Co-authored-by: Prometheus3375 <[email protected]> Co-authored-by: Adam Turner <[email protected]>
1 parent f5b1510 commit f37ac53

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Doc/library/stdtypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4635,7 +4635,7 @@ can be used interchangeably to index the same dictionary entry.
46354635

46364636
:meth:`update` accepts either another object with a ``keys()`` method (in
46374637
which case :meth:`~object.__getitem__` is called with every key returned from
4638-
the method). or an iterable of key/value pairs (as tuples or other iterables
4638+
the method) or an iterable of key/value pairs (as tuples or other iterables
46394639
of length two). If keyword arguments are specified, the dictionary is then
46404640
updated with those key/value pairs: ``d.update(red=1, blue=2)``.
46414641

Objects/dictobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4625,8 +4625,8 @@ PyDoc_STRVAR(getitem__doc__,
46254625
"__getitem__($self, key, /)\n--\n\nReturn self[key].");
46264626

46274627
PyDoc_STRVAR(update__doc__,
4628-
"D.update([E, ]**F) -> None. Update D from dict/iterable E and F.\n\
4629-
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k]\n\
4628+
"D.update([E, ]**F) -> None. Update D from mapping/iterable E and F.\n\
4629+
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k]\n\
46304630
If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v\n\
46314631
In either case, this is followed by: for k in F: D[k] = F[k]");
46324632

0 commit comments

Comments
 (0)