curses.window.insnstr()

window.insnstr(str, n[, attr]) window.insnstr(y, x, str, n[, attr]) Insert a character string (as many characters as will fit on the line) before the character under the cursor, up to n characters. If n is zero or negative, the entire string is inserted. All characters to the right of the cursor are shifted right, with the rightmost characters on the line being lost. The cursor position does not change (after moving to y, x, if specified).

curses.panel.top_panel()

curses.panel.top_panel() Returns the top panel in the panel stack.

mimetypes.MimeTypes.suffix_map

MimeTypes.suffix_map Dictionary mapping suffixes to suffixes. This is used to allow recognition of encoded files for which the encoding and the type are indicated by the same extension. For example, the .tgz extension is mapped to .tar.gz to allow the encoding and type to be recognized separately. This is initially a copy of the global suffix_map defined in the module.

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.

turtle.exitonclick()

turtle.exitonclick() Bind bye() method to mouse clicks on the Screen. If the value “using_IDLE” in the configuration dictionary is False (default value), also enter mainloop. Remark: If IDLE with the -n switch (no subprocess) is used, this value should be set to True in turtle.cfg. In this case IDLE’s own mainloop is active also for the client script.

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.

types.MappingProxyType.get()

get(key[, default]) Return the value for key if key is in the underlying mapping, else default. If default is not given, it defaults to None, so that this method never raises a KeyError.