reprlib.Repr.maxstring

Repr.maxstring Limit on the number of characters in the representation of the string. Note that the “normal” representation of the string is used as the character source: if escape sequences are needed in the representation, these may be mangled when the representation is shortened. The default is 30.

signal.set_wakeup_fd()

signal.set_wakeup_fd(fd) Set the wakeup file descriptor to fd. When a signal is received, the signal number is written as a single byte into the fd. This can be used by a library to wakeup a poll or select call, allowing the signal to be fully processed. The old wakeup fd is returned. fd must be non-blocking. It is up to the library to remove any bytes before calling poll or select again. Use for example struct.unpack('%uB' % len(data), data) to decode the signal numbers list. When threads a

xml.sax.xmlreader.XMLReader.setProperty()

XMLReader.setProperty(propertyname, value) Set the propertyname to value. If the property is not recognized, SAXNotRecognizedException is raised. If the property or its setting is not supported by the parser, SAXNotSupportedException is raised.

bytearray.rfind()

bytearray.rfind(sub[, start[, end]]) Return the highest index in the sequence where the subsequence sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation. Return -1 on failure. The subsequence to search for may be any bytes-like object or an integer in the range 0 to 255. Changed in version 3.3: Also accept an integer in the range 0 to 255 as the subsequence.

sqlite3.Connection.in_transaction

in_transaction True if a transaction is active (there are uncommitted changes), False otherwise. Read-only attribute. New in version 3.2.

pkgutil.ImpLoader

class pkgutil.ImpLoader(fullname, file, filename, etc) PEP 302 Loader that wraps Python’s “classic” import algorithm. Deprecated since version 3.3: This emulation is no longer needed, as the standard import mechanism is now fully PEP 302 compliant and available in importlib.

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

traceback.TracebackException.format_exception_only()

format_exception_only() Format the exception part of the traceback. The return value is a generator of strings, each ending in a newline. Normally, the generator emits a single string; however, for SyntaxError exceptions, it emits several lines that (when printed) display detailed information about where the syntax error occurred. The message indicating which exception occurred is always the last string in the output.

inspect.Parameter.replace()

replace(*[, name][, kind][, default][, annotation]) Create a new Parameter instance based on the instance replaced was invoked on. To override a Parameter attribute, pass the corresponding argument. To remove a default value or/and an annotation from a Parameter, pass Parameter.empty. >>> from inspect import Parameter >>> param = Parameter('foo', Parameter.KEYWORD_ONLY, default=42) >>> str(param) 'foo=42' >>> str(param.replace()) # Will create a shallow c

ast.AST._fields

_fields Each concrete class has an attribute _fields which gives the names of all child nodes. Each instance of a concrete class has one attribute for each child node, of the type as defined in the grammar. For example, ast.BinOp instances have an attribute left of type ast.expr. If these attributes are marked as optional in the grammar (using a question mark), the value might be None. If the attributes can have zero-or-more values (marked with an asterisk), the values are represented as Pyt