MCPcopy
hub / github.com/fluentpython/example-code-2e / update

Method update

14-inheritance/strkeydict_dictsub.py:84–93  ·  view source on GitHub ↗
(self, iterable=None, **kwds)

Source from the content-addressed store, hash-verified

82 return default
83
84 def update(self, iterable=None, **kwds):
85 if iterable is not None:
86 try: # duck typing FTW!
87 pairs = iterable.items()
88 except AttributeError:
89 pairs = iterable
90 for key, value in pairs:
91 self[key] = value
92 if kwds:
93 self.update(kwds)

Callers 6

__init__Method · 0.95
__init__Method · 0.45
add_globalsFunction · 0.45
standard_envFunction · 0.45
standard_envFunction · 0.45
standard_envFunction · 0.45

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected