MCPcopy Index your code
hub / github.com/python/cpython / update

Method update

Lib/mailbox.py:171–186  ·  view source on GitHub ↗

Change the messages that correspond to certain keys.

(self, arg=None)

Source from the content-addressed store, hash-verified

169 raise KeyError('No messages in mailbox')
170
171 def update(self, arg=None):
172 """Change the messages that correspond to certain keys."""
173 if hasattr(arg, 'iteritems'):
174 source = arg.iteritems()
175 elif hasattr(arg, 'items'):
176 source = arg.items()
177 else:
178 source = arg
179 bad_key = False
180 for key, message in source:
181 try:
182 self[key] = message
183 except KeyError:
184 bad_key = True
185 if bad_key:
186 raise KeyError('No message with key(s)')
187
188 def flush(self):
189 """Write any pending changes to the disk."""

Callers 3

test_notimplementedMethod · 0.95
get_sequencesMethod · 0.45
get_labelsMethod · 0.45

Calls 2

iteritemsMethod · 0.45
itemsMethod · 0.45

Tested by 1

test_notimplementedMethod · 0.76