ipaddress.get_mixed_type_key()

ipaddress.get_mixed_type_key(obj) Return a key suitable for sorting between networks and addresses. Address and Network objects are not sortable by default; they’re fundamentally different, so the expression: IPv4Address('192.0.2.0') <= IPv4Network('192.0.2.0/24') doesn’t make sense. There are some times however, where you may wish to have ipaddress sort these anyway. If you need to do this, you can use this function as the key argument to sorted(). obj is either a network or address obj

email.message.EmailMessage.get_content()

get_content(*args, content_manager=None, **kw) Call the get_content method of the content_manager, passing self as the message object, and passing along any other arguments or keywords as additional arguments. If content_manager is not specified, use the content_manager specified by the current policy.

nntplib.NNTP

class nntplib.NNTP(host, port=119, user=None, password=None, readermode=None, usenetrc=False[, timeout]) Return a new NNTP object, representing a connection to the NNTP server running on host host, listening at port port. An optional timeout can be specified for the socket connection. If the optional user and password are provided, or if suitable credentials are present in /.netrc and the optional flag usenetrc is true, the AUTHINFO USER and AUTHINFO PASS commands are used to identify and au

smtplib.SMTP.login()

SMTP.login(user, password, *, initial_response_ok=True) Log in on an SMTP server that requires authentication. The arguments are the username and the password to authenticate with. If there has been no previous EHLO or HELO command this session, this method tries ESMTP EHLO first. This method will return normally if the authentication was successful, or may raise the following exceptions: SMTPHeloError The server didn’t reply properly to the HELO greeting. SMTPAuthenticationError The s

asyncio.ProactorEventLoop

class asyncio.ProactorEventLoop Proactor event loop for Windows using “I/O Completion Ports” aka IOCP. Subclass of AbstractEventLoop. Availability: Windows. See also MSDN documentation on I/O Completion Ports.

object.__reduce__()

object.__reduce__() The interface is currently defined as follows. The __reduce__() method takes no argument and shall return either a string or preferably a tuple (the returned object is often referred to as the “reduce value”). If a string is returned, the string should be interpreted as the name of a global variable. It should be the object’s local name relative to its module; the pickle module searches the module namespace to determine the object’s module. This behaviour is typically use

select.epoll.poll()

epoll.poll(timeout=-1, maxevents=-1) Wait for events. timeout in seconds (float) Changed in version 3.5: The function is now retried with a recomputed timeout when interrupted by a signal, except if the signal handler raises an exception (see PEP 475 for the rationale), instead of raising InterruptedError.

difflib.HtmlDiff.make_file()

make_file(fromlines, tolines, fromdesc='', todesc='', context=False, numlines=5, *, charset='utf-8') Compares fromlines and tolines (lists of strings) and returns a string which is a complete HTML file containing a table showing line by line differences with inter-line and intra-line changes highlighted. fromdesc and todesc are optional keyword arguments to specify from/to file column header strings (both default to an empty string). context and numlines are both optional keyword arguments.

collections.OrderedDict.move_to_end()

move_to_end(key, last=True) Move an existing key to either end of an ordered dictionary. The item is moved to the right end if last is true (the default) or to the beginning if last is false. Raises KeyError if the key does not exist: >>> d = OrderedDict.fromkeys('abcde') >>> d.move_to_end('b') >>> ''.join(d.keys()) 'acdeb' >>> d.move_to_end('b', last=False) >>> ''.join(d.keys()) 'bacde' New in version 3.2.

wsgiref.simple_server.WSGIRequestHandler.handle()

handle() Process the HTTP request. The default implementation creates a handler instance using a wsgiref.handlers class to implement the actual WSGI application interface.