MCPcopy Index your code
hub / github.com/RustPython/RustPython / update

Method update

Lib/mailbox.py:164–179  ·  view source on GitHub ↗

Change the messages that correspond to certain keys.

(self, arg=None)

Source from the content-addressed store, hash-verified

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

Callers 3

test_notimplementedMethod · 0.95
get_sequencesMethod · 0.45
get_labelsMethod · 0.45

Calls 3

hasattrFunction · 0.85
iteritemsMethod · 0.45
itemsMethod · 0.45

Tested by 1

test_notimplementedMethod · 0.76