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

Method __init__

Lib/imaplib.py:189–215  ·  view source on GitHub ↗
(self, host='', port=IMAP4_PORT, timeout=None)

Source from the content-addressed store, hash-verified

187 class _responsetimeout(TimeoutError): pass # No response during IDLE
188
189 def __init__(self, host='', port=IMAP4_PORT, timeout=None):
190 self.debug = Debug
191 self.state = 'LOGOUT'
192 self.literal = None # A literal argument to a command
193 self.tagged_commands = {} # Tagged commands awaiting response
194 self.untagged_responses = {} # {typ: [data, ...], ...}
195 self.continuation_response = '' # Last continuation response
196 self._idle_responses = [] # Response queue for idle iteration
197 self._idle_capture = False # Whether to queue responses for idle
198 self.is_readonly = False # READ-ONLY desired state
199 self.tagnum = 0
200 self._tls_established = False
201 self._mode_ascii()
202 self._readbuf = []
203
204 # Open socket to server.
205
206 self.open(host, port, timeout)
207
208 try:
209 self._connect()
210 except Exception:
211 try:
212 self.shutdown()
213 except OSError:
214 pass
215 raise
216
217 def _mode_ascii(self):
218 self.utf8_enabled = False

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 4

_mode_asciiMethod · 0.95
openMethod · 0.95
_connectMethod · 0.95
shutdownMethod · 0.95

Tested by

no test coverage detected