wsgiref.handlers.BaseHandler.log_exception()

log_exception(exc_info) Log the exc_info tuple in the server log. exc_info is a (type, value, traceback) tuple. The default implementation simply writes the traceback to the request’s wsgi.errors stream and flushes it. Subclasses can override this method to change the format or retarget the output, mail the traceback to an administrator, or whatever other action may be deemed suitable.

sys.excepthook()

sys.excepthook(type, value, traceback) This function prints out a given traceback and exception to sys.stderr. When an exception is raised and uncaught, the interpreter calls sys.excepthook with three arguments, the exception class, exception instance, and a traceback object. In an interactive session this happens just before control is returned to the prompt; in a Python program this happens just before the program exits. The handling of such top-level exceptions can be customized by assign

str.isidentifier()

str.isidentifier() Return true if the string is a valid identifier according to the language definition, section Identifiers and keywords. Use keyword.iskeyword() to test for reserved identifiers such as def and class.

email.utils.getaddresses()

email.utils.getaddresses(fieldvalues) This method returns a list of 2-tuples of the form returned by parseaddr(). fieldvalues is a sequence of header field values as might be returned by Message.get_all. Here’s a simple example that gets all the recipients of a message: from email.utils import getaddresses tos = msg.get_all('to', []) ccs = msg.get_all('cc', []) resent_tos = msg.get_all('resent-to', []) resent_ccs = msg.get_all('resent-cc', []) all_recipients = getaddresses(tos + ccs + resen

http.client.RemoteDisconnected

exception http.client.RemoteDisconnected A subclass of ConnectionResetError and BadStatusLine. Raised by HTTPConnection.getresponse() when the attempt to read the response results in no data read from the connection, indicating that the remote end has closed the connection. New in version 3.5: Previously, BadStatusLine('') was raised.

urllib.request.HTTPPasswordMgrWithPriorAuth.update_authenticated()

HTTPPasswordMgrWithPriorAuth.update_authenticated(self, uri, is_authenticated=False) Update the is_authenticated flag for the given uri or list of URIs.

mailbox.Mailbox.pop()

pop(key, default=None) Return a representation of the message corresponding to key and delete the message. If no such message exists, return default. The message is represented as an instance of the appropriate format-specific Message subclass unless a custom message factory was specified when the Mailbox instance was initialized.

asyncio.Queue.put_nowait()

put_nowait(item) Put an item into the queue without blocking. If no free slot is immediately available, raise QueueFull.

xml.dom.Element.setAttributeNS()

Element.setAttributeNS(namespaceURI, qname, value) Set an attribute value from a string, given a namespaceURI and a qname. Note that a qname is the whole attribute name. This is different than above.

asyncio.Condition.locked()

locked() Return True if the underlying lock is acquired.