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

Method discard

Lib/mailbox.py:60–65  ·  view source on GitHub ↗

If the keyed message exists, remove it.

(self, key)

Source from the content-addressed store, hash-verified

58 self.remove(key)
59
60 def discard(self, key):
61 """If the keyed message exists, remove it."""
62 try:
63 self.remove(key)
64 except KeyError:
65 pass
66
67 def __setitem__(self, key, message):
68 """Replace the keyed message; raise KeyError if it doesn't exist."""

Callers 14

clearMethod · 0.95
popMethod · 0.95
test_notimplementedMethod · 0.95
attr_matchesMethod · 0.45
unregisterMethod · 0.45
wrapperFunction · 0.45
format_frame_summaryMethod · 0.45
__dir__Method · 0.45
__new__Method · 0.45
collect_childrenMethod · 0.45
mainFunction · 0.45
_topological_orderMethod · 0.45

Calls 1

removeMethod · 0.95

Tested by 1

test_notimplementedMethod · 0.76