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

Method discard

Lib/mailbox.py:53–58  ·  view source on GitHub ↗

If the keyed message exists, remove it.

(self, key)

Source from the content-addressed store, hash-verified

51 self.remove(key)
52
53 def discard(self, key):
54 """If the keyed message exists, remove it."""
55 try:
56 self.remove(key)
57 except KeyError:
58 pass
59
60 def __setitem__(self, key, message):
61 """Replace the keyed message; raise KeyError if it doesn't exist."""

Callers 13

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
builtin_set.pyFile · 0.45
get_all_importsFunction · 0.45

Calls 1

removeMethod · 0.95

Tested by 1

test_notimplementedMethod · 0.76