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

Method pop

Lib/mailbox.py:155–162  ·  view source on GitHub ↗

Delete the keyed message and return it, or default.

(self, key, default=None)

Source from the content-addressed store, hash-verified

153 self.discard(key)
154
155 def pop(self, key, default=None):
156 """Delete the keyed message and return it, or default."""
157 try:
158 result = self[key]
159 except KeyError:
160 return default
161 self.discard(key)
162 return result
163
164 def popitem(self):
165 """Delete an arbitrary (key, message) pair and return it."""

Callers 2

popitemMethod · 0.95
test_notimplementedMethod · 0.95

Calls 1

discardMethod · 0.95

Tested by 1

test_notimplementedMethod · 0.76