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

Method _open_mh_sequences_file

Lib/mailbox.py:1149–1161  ·  view source on GitHub ↗
(self, text)

Source from the content-addressed store, hash-verified

1147 return len(list(self.iterkeys()))
1148
1149 def _open_mh_sequences_file(self, text):
1150 mode = '' if text else 'b'
1151 kwargs = {'encoding': 'ASCII'} if text else {}
1152 path = os.path.join(self._path, '.mh_sequences')
1153 while True:
1154 try:
1155 return open(path, 'r+' + mode, **kwargs)
1156 except FileNotFoundError:
1157 pass
1158 try:
1159 return open(path, 'x+' + mode, **kwargs)
1160 except FileExistsError:
1161 pass
1162
1163 def lock(self):
1164 """Lock the mailbox."""

Callers 2

lockMethod · 0.95
set_sequencesMethod · 0.95

Calls 2

openFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected