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

Method get_labels

Lib/mailbox.py:1406–1413  ·  view source on GitHub ↗

Return a list of user-defined labels in the mailbox.

(self)

Source from the content-addressed store, hash-verified

1404 return io.BytesIO(self.get_bytes(key).replace(b'\n', linesep))
1405
1406 def get_labels(self):
1407 """Return a list of user-defined labels in the mailbox."""
1408 self._lookup()
1409 labels = set()
1410 for label_list in self._labels.values():
1411 labels.update(label_list)
1412 labels.difference_update(self._special_labels)
1413 return list(labels)
1414
1415 def _generate_toc(self):
1416 """Generate key-to-(start, stop) table of contents."""

Callers 8

_pre_mailbox_hookMethod · 0.95
addMethod · 0.45
__setitem__Method · 0.45
_install_messageMethod · 0.45
test_labelsMethod · 0.45
test_maildir_to_babylMethod · 0.45
test_mh_to_babylMethod · 0.45

Calls 6

setFunction · 0.85
listClass · 0.85
difference_updateMethod · 0.80
_lookupMethod · 0.45
valuesMethod · 0.45
updateMethod · 0.45

Tested by 4

test_labelsMethod · 0.36
test_maildir_to_babylMethod · 0.36
test_mh_to_babylMethod · 0.36