mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
[3.12] gh-116938: Clarify documentation of dict
and dict.update
regarding the positional argument they accept (GH-125213) (#125337)
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
parent
4ab19f912d
commit
3f38ea11c0
2 changed files with 14 additions and 13 deletions
|
@ -973,7 +973,7 @@ class MutableMapping(Mapping):
|
|||
|
||||
def update(self, other=(), /, **kwds):
|
||||
''' D.update([E, ]**F) -> None. Update D from mapping/iterable E and F.
|
||||
If E present and has a .keys() method, does: for k in E: D[k] = E[k]
|
||||
If E present and has a .keys() method, does: for k in E.keys(): D[k] = E[k]
|
||||
If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v
|
||||
In either case, this is followed by: for k, v in F.items(): D[k] = v
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue