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

Method discard

tools/python-3.11.9-amd64/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 10

clearMethod · 0.95
popMethod · 0.95
attr_matchesMethod · 0.45
unregisterMethod · 0.45
wrapperFunction · 0.45
__dir__Method · 0.45
__new__Method · 0.45
wrapperFunction · 0.45
collect_childrenMethod · 0.45
list_modulesFunction · 0.45

Calls 1

removeMethod · 0.95

Tested by

no test coverage detected