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

Method popitem

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

Delete an arbitrary (key, message) pair and return it.

(self)

Source from the content-addressed store, hash-verified

162 return result
163
164 def popitem(self):
165 """Delete an arbitrary (key, message) pair and return it."""
166 for key in self.iterkeys():
167 return (key, self.pop(key)) # This is only run once.
168 else:
169 raise KeyError('No messages in mailbox')
170
171 def update(self, arg=None):
172 """Change the messages that correspond to certain keys."""

Callers 1

test_notimplementedMethod · 0.95

Calls 2

iterkeysMethod · 0.95
popMethod · 0.95

Tested by 1

test_notimplementedMethod · 0.76