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.

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.

mmap.mmap

class mmap.mmap(fileno, length, tagname=None, access=ACCESS_DEFAULT[, offset]) (Windows version) Maps length bytes from the file specified by the file handle fileno, and creates a mmap object. If length is larger than the current size of the file, the file is extended to contain length bytes. If length is 0, the maximum length of the map is the current size of the file, except that if the file is empty Windows raises an exception (you cannot create an empty mapping on Windows). tagname, if s

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.

io.RawIOBase

class io.RawIOBase Base class for raw binary I/O. It inherits IOBase. There is no public constructor. Raw binary I/O typically provides low-level access to an underlying OS device or API, and does not try to encapsulate it in high-level primitives (this is left to Buffered I/O and Text I/O, described later in this page). In addition to the attributes and methods from IOBase, RawIOBase provides the following methods: read(size=-1) Read up to size bytes from the object and return them. As a

heapq.heapreplace()

heapq.heapreplace(heap, item) Pop and return the smallest item from the heap, and also push the new item. The heap size doesn’t change. If the heap is empty, IndexError is raised. This one step operation is more efficient than a heappop() followed by heappush() and can be more appropriate when using a fixed-size heap. The pop/push combination always returns an element from the heap and replaces it with item. The value returned may be larger than the item added. If that isn’t desired, conside