sqlite3.Connection.set_progress_handler()

set_progress_handler(handler, n) This routine registers a callback. The callback is invoked for every n instructions of the SQLite virtual machine. This is useful if you want to get called from SQLite during long-running operations, for example to update a GUI. If you want to clear any previously installed progress handler, call the method with None for handler.

__main__

'__main__' is the name of the scope in which top-level code executes. A module’s __name__ is set equal to '__main__' when read from standard input, a script, or from an interactive prompt. A module can discover whether or not it is running in the main scope by checking its own __name__, which allows a common idiom for conditionally executing code in a module when it is run as a script or with python -m but not when it is imported: if __name__ == "__main__": # execute only if run as a script

collections.abc.MutableSequence

class collections.abc.MutableSequence class collections.abc.ByteString ABCs for read-only and mutable sequences. Implementation note: Some of the mixin methods, such as __iter__(), __reversed__() and index(), make repeated calls to the underlying __getitem__() method. Consequently, if __getitem__() is implemented with constant access speed, the mixin methods will have linear performance; however, if the underlying method is linear (as it would be with a linked list), the mixins will have quad

fileinput.hook_encoded()

fileinput.hook_encoded(encoding) Returns a hook which opens each file with open(), using the given encoding to read the file. Usage example: fi = fileinput.FileInput(openhook=fileinput.hook_encoded("iso-8859-1"))

xml.parsers.expat.xmlparser.StartDoctypeDeclHandler()

xmlparser.StartDoctypeDeclHandler(doctypeName, systemId, publicId, has_internal_subset) Called when Expat begins parsing the document type declaration (<!DOCTYPE ...). The doctypeName is provided exactly as presented. The systemId and publicId parameters give the system and public identifiers if specified, or None if omitted. has_internal_subset will be true if the document contains and internal document declaration subset. This requires Expat version 1.2 or newer.

bytes.rstrip()

bytes.rstrip([chars]) bytearray.rstrip([chars]) Return a copy of the sequence with specified trailing bytes removed. The chars argument is a binary sequence specifying the set of byte values to be removed - the name refers to the fact this method is usually used with ASCII characters. If omitted or None, the chars argument defaults to removing ASCII whitespace. The chars argument is not a suffix; rather, all combinations of its values are stripped: >>> b' spacious '.rstrip() b'

operator.truth()

operator.truth(obj) Return True if obj is true, and False otherwise. This is equivalent to using the bool constructor.

email.message.Message.set_param()

set_param(param, value, header='Content-Type', requote=True, charset=None, language='', replace=False) Set a parameter in the Content-Type header. If the parameter already exists in the header, its value will be replaced with value. If the Content-Type header as not yet been defined for this message, it will be set to text/plain and the new parameter value will be appended as per RFC 2045. Optional header specifies an alternative header to Content-Type, and all parameters will be quoted as n

os.sched_setparam()

os.sched_setparam(pid, param) Set a scheduling parameters for the process with PID pid. A pid of 0 means the calling process. param is a sched_param instance.

cmd.Cmd.completedefault()

Cmd.completedefault(text, line, begidx, endidx) Method called to complete an input line when no command-specific complete_*() method is available. By default, it returns an empty list.