ctypes.set_errno()

ctypes.set_errno(value) Set the current value of the ctypes-private copy of the system errno variable in the calling thread to value and return the previous value.

xml.dom.Element.setAttribute()

Element.setAttribute(name, value) Set an attribute value from a string.

unittest.mock.Mock.called

called A boolean representing whether or not the mock object has been called: >>> mock = Mock(return_value=None) >>> mock.called False >>> mock() >>> mock.called True

bisect.insort_left()

bisect.insort_left(a, x, lo=0, hi=len(a)) Insert x in a in sorted order. This is equivalent to a.insert(bisect.bisect_left(a, x, lo, hi), x) assuming that a is already sorted. Keep in mind that the O(log n) search is dominated by the slow O(n) insertion step.

weakref.ReferenceError

exception weakref.ReferenceError Exception raised when a proxy object is used but the underlying object has been collected. This is the same as the standard ReferenceError exception.

email.parser.FeedParser.feed()

feed(data) Feed the FeedParser some more data. data should be a string containing one or more lines. The lines can be partial and the FeedParser will stitch such partial lines together properly. The lines in the string can have any of the common three line endings, carriage return, newline, or carriage return and newline (they can even be mixed).

msilib.Directory.start_component()

start_component(component=None, feature=None, flags=None, keyfile=None, uuid=None) Add an entry to the Component table, and make this component the current component for this directory. If no component name is given, the directory name is used. If no feature is given, the current feature is used. If no flags are given, the directory’s default flags are used. If no keyfile is given, the KeyPath is left null in the Component table.

str.startswith()

str.startswith(prefix[, start[, end]]) Return True if string starts with the prefix, otherwise return False. prefix can also be a tuple of prefixes to look for. With optional start, test string beginning at that position. With optional end, stop comparing string at that position.

xml.dom.Attr.name

Attr.name The attribute name. In a namespace-using document it may include a colon.

xml.etree.ElementTree.XMLParser

class xml.etree.ElementTree.XMLParser(html=0, target=None, encoding=None) This class is the low-level building block of the module. It uses xml.parsers.expat for efficient, event-based parsing of XML. It can be fed XML data incrementally with the feed() method, and parsing events are translated to a push API - by invoking callbacks on the target object. If target is omitted, the standard TreeBuilder is used. The html argument was historically used for backwards compatibility and is now depre