diff -r de81e0fe4905 Lib/imaplib.py --- a/Lib/imaplib.py Sun Mar 02 20:29:18 2014 +0100 +++ b/Lib/imaplib.py Mon Mar 03 00:33:44 2014 +0100 @@ -165,7 +165,7 @@ class abort(error): pass # Service errors - close and retry class readonly(abort): pass # Mailbox status changed to READ-ONLY - def __init__(self, host = '', port = IMAP4_PORT): + def __init__(self, host = 'localhost', port = IMAP4_PORT): self.debug = Debug self.state = 'LOGOUT' self.literal = None # A literal argument to a command @@ -1205,7 +1205,7 @@ """ - def __init__(self, host='', port=IMAP4_SSL_PORT, keyfile=None, certfile=None, ssl_context=None): + def __init__(self, host='localhost', port=IMAP4_SSL_PORT, keyfile=None, certfile=None, ssl_context=None): if ssl_context is not None and keyfile is not None: raise ValueError("ssl_context and keyfile arguments are mutually " "exclusive")