MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / pop

Method pop

tools/python-3.11.9-amd64/Lib/mailbox.py:148–155  ·  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

146 self.discard(key)
147
148 def pop(self, key, default=None):
149 """Delete the keyed message and return it, or default."""
150 try:
151 result = self[key]
152 except KeyError:
153 return default
154 self.discard(key)
155 return result
156
157 def popitem(self):
158 """Delete an arbitrary (key, message) pair and return it."""

Callers 1

popitemMethod · 0.95

Calls 1

discardMethod · 0.95

Tested by

no test coverage detected