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

Method _pre_mailbox_hook

Lib/mailbox.py:1438–1446  ·  view source on GitHub ↗

Called before writing the mailbox to file f.

(self, f)

Source from the content-addressed store, hash-verified

1436 self._file_length = self._file.tell()
1437
1438 def _pre_mailbox_hook(self, f):
1439 """Called before writing the mailbox to file f."""
1440 babyl = b'BABYL OPTIONS:' + linesep
1441 babyl += b'Version: 5' + linesep
1442 labels = self.get_labels()
1443 labels = (label.encode() for label in labels)
1444 babyl += b'Labels:' + b','.join(labels) + linesep
1445 babyl += b'\037'
1446 f.write(babyl)
1447
1448 def _pre_message_hook(self, f):
1449 """Called before writing each message to file f."""

Callers

nothing calls this directly

Calls 4

get_labelsMethod · 0.95
encodeMethod · 0.45
joinMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected