inspect.formatargspec()

inspect.formatargspec(args[, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations[, formatarg, formatvarargs, formatvarkw, formatvalue, formatreturns, formatannotations]]) Format a pretty argument spec from the values returned by getargspec() or getfullargspec(). The first seven arguments are (args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations). The other six arguments are functions that are called to turn argument names, * argument name, ** argument name, d

base64.encodebytes()

base64.encodebytes(s) base64.encodestring(s) Encode the bytes-like object s, which can contain arbitrary binary data, and return bytes containing the base64-encoded data, with newlines (b'\n') inserted after every 76 bytes of output, and ensuring that there is a trailing newline, as per RFC 2045 (MIME). encodestring is a deprecated alias.

subprocess.CompletedProcess.args

args The arguments used to launch the process. This may be a list or a string.

bytearray.expandtabs()

bytearray.expandtabs(tabsize=8) Return a copy of the sequence where all ASCII tab characters are replaced by one or more ASCII spaces, depending on the current column and the given tab size. Tab positions occur every tabsize bytes (default is 8, giving tab positions at columns 0, 8, 16 and so on). To expand the sequence, the current column is set to zero and the sequence is examined byte by byte. If the byte is an ASCII tab character (b'\t'), one or more space characters are inserted in the

ctypes._FuncPtr.errcheck

errcheck Assign a Python function or another callable to this attribute. The callable will be called with three or more arguments: callable(result, func, arguments) result is what the foreign function returns, as specified by the restype attribute. func is the foreign function object itself, this allows reusing the same callable object to check or post process the results of several functions. arguments is a tuple containing the parameters originally passed to the function call, this allo

ctypes._FuncPtr.restype

restype Assign a ctypes type to specify the result type of the foreign function. Use None for void, a function not returning anything. It is possible to assign a callable Python object that is not a ctypes type, in this case the function is assumed to return a C int, and the callable will be called with this integer, allowing further processing or error checking. Using this is deprecated, for more flexible post processing or error checking use a ctypes data type as restype and assign a calla

pkgutil.iter_modules()

pkgutil.iter_modules(path=None, prefix='') Yields (module_finder, name, ispkg) for all submodules on path, or, if path is None, all top-level modules on sys.path. path should be either None or a list of paths to look for modules in. prefix is a string to output on the front of every module name on output. Note Only works for a finder which defines an iter_modules() method. This interface is non-standard, so the module also provides implementations for importlib.machinery.FileFinder and zipi

doctest.DocTest

class doctest.DocTest(examples, globs, name, filename, lineno, docstring) A collection of doctest examples that should be run in a single namespace. The constructor arguments are used to initialize the attributes of the same names. DocTest defines the following attributes. They are initialized by the constructor, and should not be modified directly. examples A list of Example objects encoding the individual interactive Python examples that should be run by this test. globs The names

xml.etree.ElementTree.Comment()

xml.etree.ElementTree.Comment(text=None) Comment element factory. This factory function creates a special element that will be serialized as an XML comment by the standard serializer. The comment string can be either a bytestring or a Unicode string. text is a string containing the comment string. Returns an element instance representing a comment. Note that XMLParser skips over comments in the input instead of creating comment objects for them. An ElementTree will only contain comment nodes

unittest.mock.Mock.return_value

return_value Set this to configure the value returned by calling the mock: >>> mock = Mock() >>> mock.return_value = 'fish' >>> mock() 'fish' The default return value is a mock object and you can configure it in the normal way: >>> mock = Mock() >>> mock.return_value.attribute = sentinel.Attribute >>> mock.return_value() <Mock name='mock()()' id='...'> >>> mock.return_value.assert_called_with() return_value can also be se