os.WIFSIGNALED()

os.WIFSIGNALED(status) Return True if the process exited due to a signal, otherwise return False. Availability: Unix.

xml.dom.NamedNodeMap.item()

NamedNodeMap.item(index) Return an attribute with a particular index. The order you get the attributes in is arbitrary but will be consistent for the life of a DOM. Each item is an attribute node. Get its value with the value attribute.

xml.dom.DocumentType.name

DocumentType.name The name of the root element as given in the DOCTYPE declaration, if present.

unittest.mock.Mock.assert_any_call()

assert_any_call(*args, **kwargs) assert the mock has been called with the specified arguments. The assert passes if the mock has ever been called, unlike assert_called_with() and assert_called_once_with() that only pass if the call is the most recent one. >>> mock = Mock(return_value=None) >>> mock(1, 2, arg='thing') >>> mock('some', 'thing', 'else') >>> mock.assert_any_call(1, 2, arg='thing')

xdrlib.Unpacker.unpack_opaque()

Unpacker.unpack_opaque() Unpacks and returns a variable length opaque data string, similarly to unpack_string().

asyncio.Task.print_stack()

print_stack(*, limit=None, file=None) Print the stack or traceback for this task’s coroutine. This produces output similar to that of the traceback module, for the frames retrieved by get_stack(). The limit argument is passed to get_stack(). The file argument is an I/O stream to which the output is written; by default output is written to sys.stderr.

tracemalloc.StatisticDiff.count_diff

count_diff Difference of number of memory blocks between the old and the new snapshots (int): 0 if the memory blocks have been allocated in the new snapshot.

calendar.calendar()

calendar.calendar(year, w=2, l=1, c=6, m=3) Returns a 3-column calendar for an entire year as a multi-line string using the formatyear() of the TextCalendar class.

importlib.util.LazyLoader.factory()

classmethod factory(loader) A static method which returns a callable that creates a lazy loader. This is meant to be used in situations where the loader is passed by class instead of by instance. suffixes = importlib.machinery.SOURCE_SUFFIXES loader = importlib.machinery.SourceFileLoader lazy_loader = importlib.util.LazyLoader.factory(loader) finder = importlib.machinery.FileFinder(path, (lazy_loader, suffixes))

profile.Profile.print_stats()

print_stats(sort=-1) Create a Stats object based on the current profile and print the results to stdout.