signal.pthread_sigmask()

signal.pthread_sigmask(how, mask) Fetch and/or change the signal mask of the calling thread. The signal mask is the set of signals whose delivery is currently blocked for the caller. Return the old signal mask as a set of signals. The behavior of the call is dependent on the value of how, as follows. SIG_BLOCK: The set of blocked signals is the union of the current set and the mask argument. SIG_UNBLOCK: The signals in mask are removed from the current set of blocked signals. It is permiss

typing.TypeVar

class typing.TypeVar Type variable. Usage: T = TypeVar('T') # Can be anything A = TypeVar('A', str, bytes) # Must be str or bytes Type variables exist primarily for the benefit of static type checkers. They serve as the parameters for generic types as well as for generic function definitions. See class Generic for more information on generic types. Generic functions work as follows: def repeat(x: T, n: int) -> Sequence[T]: """Return a list containing n references to x.""" retur

tabnanny.NannyNag

exception tabnanny.NannyNag Raised by tokeneater() if detecting an ambiguous indent. Captured and handled in check().

functools.update_wrapper()

functools.update_wrapper(wrapper, wrapped, assigned=WRAPPER_ASSIGNMENTS, updated=WRAPPER_UPDATES) Update a wrapper function to look like the wrapped function. The optional arguments are tuples to specify which attributes of the original function are assigned directly to the matching attributes on the wrapper function and which attributes of the wrapper function are updated with the corresponding attributes from the original function. The default values for these arguments are the module leve

dis.Bytecode.first_line

first_line The first source line of the code object (if available)

bytearray.capitalize()

bytearray.capitalize() Return a copy of the sequence with each byte interpreted as an ASCII character, and the first byte capitalized and the rest lowercased. Non-ASCII byte values are passed through unchanged. Note The bytearray version of this method does not operate in place - it always produces a new object, even if no changes were made.

email.contentmanager.get_content()

email.contentmanager.get_content(msg, errors='replace') Return the payload of the part as either a string (for text parts), an EmailMessage object (for message/rfc822 parts), or a bytes object (for all other non-multipart types). Raise a KeyError if called on a multipart. If the part is a text part and errors is specified, use it as the error handler when decoding the payload to unicode. The default error handler is replace.

doctest.DocTestSuite()

doctest.DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None, setUp=None, tearDown=None, checker=None) Convert doctest tests for a module to a unittest.TestSuite. The returned unittest.TestSuite is to be run by the unittest framework and runs each doctest in the module. If any of the doctests fail, then the synthesized unit test fails, and a failureException exception is raised showing the name of the file containing the test and a (sometimes approximate) line number. Opti

http.client.HTTPResponse.status

HTTPResponse.status Status code returned by server.

asyncio.wait_for()

coroutine asyncio.wait_for(fut, timeout, *, loop=None) Wait for the single Future or coroutine object to complete with timeout. If timeout is None, block until the future completes. Coroutine will be wrapped in Task. Returns result of the Future or coroutine. When a timeout occurs, it cancels the task and raises asyncio.TimeoutError. To avoid the task cancellation, wrap it in shield(). If the wait is cancelled, the future fut is also cancelled. This function is a coroutine, usage: result = y