pprint — Data pretty printer — Python 3.15.2 documentation
Source code: Lib/pprint.py The pprint module provides a capability to “pretty-print” arbitrary Python data structures in a form which can be used as input ...
Source code: Lib/pprint.py The pprint module provides a capability to “pretty-print” arbitrary Python data structures in a form which can be used as input ...
Python debuggers and similar tools may now more reliably update local variables in optimized scopes even during concurrent code execution. PEP 703: CPython 3.13 ...
py = import('python').find_installation(pure: false). py.extension_module( 'spam', # name of the importable Python module 'spammodule.c', # the C source file install: trueThere’s a slight type mismatch here: Python’s str objects store Unicode text, but C strings are arrays of bytes.
23 hours ago · What's new in Python 3.15? Or all "What's new" documents since Python 2.0 Tutorial Start here: a tour of Python's syntax and features Built-ins reference Built-in functions and classes Library reference Standard library modules Language reference Syntax and language elements Python setup and usage How to install, configure, and use Python Python HOWTOs In-depth topic manuals Installing Python ...
Source code: Lib/tkinter/__init__.py The tkinter package (“Tk interface”) is the standard Python interface to the Tcl/Tk GUI toolkit. Both Tk and tkinter ...
Return the string representing a character whose Unicode code point is the integer i. For example, chr(97) returns the string 'a', while chr(8364) returns the string '€'. This is the inverse of ord(). The valid range for the argument is from 0 through 1,114,111 (0x10FFFF in base 16).
23 hours ago · The module defines the following type: class array.array(typecode[, initializer]) ¶ A new array whose items are restricted by typecode, and initialized from the optional initializer value, which must be a bytes or bytearray object, a Unicode string, or iterable over elements of the appropriate type.
The biggest changes include lazy imports, frozendict and sentinel builtins, UTF-8 as the default encoding, unpacking in comprehensions, and a stable ABI for ...
Examples of namespaces are: the set of built-in names (containing functions such as abs(), and built-in exception names); the global names in a module; and the local names in a function invocation. In a sense the set of attributes of an object also forms a namespace.
23 hours ago · Source code: Lib/string/__init__.py String constants: The constants defined in this module are: Custom string formatting: The built-in string class provides the ability to do complex variable subst...
Source code: Lib/socket.py This module provides access to the BSD socket interface. It is available on all modern Unix systems, Windows, MacOS, and probably ...
23 hours ago · The array module provides an array object that is like a list that stores only homogeneous data and stores it more compactly. The following example shows an array of numbers stored as two byte unsigned binary numbers (typecode "H") rather than the usual 16 bytes per entry for regular lists of Python int objects:
1 day ago · Elsewhere, The Python Language Reference describes the exact syntax and semantics of the Python language, and Python built-ins reference describes the built-in functions. Python’s standard library is extensive, offering a wide range of facilities as indicated by the long table of contents listed below.
23 hours ago · The string type has some methods that perform useful operations for padding strings to a given column width. When you don’t need fancy output but just want a quick display of some variables for debugging purposes, you can convert any value to a string with the repr () or str () functions.