The Python Tutorial — Python 3.15.2 documentation
It helps to have a Python interpreter handy for hands-on experience, but all examples are self-contained, so the tutorial can be read off-line as well. For a ...
It helps to have a Python interpreter handy for hands-on experience, but all examples are self-contained, so the tutorial can be read off-line as well. For a ...
| Command-line introspection tools¶. Source code: Lib/asyncio/tools.py. The asyncio module can be invoked as a script via python -m asyncio to inspect the task graph of another running Python process without modifying it or restarting it. The asyncio.tools submodule implements this interface.
... while automatically managing the event loop. For example: Copy import ... while code that handles errors from os.readlink() may now treat junctions as ...
An event loop policy is a global object used to get and set the current event loop, as well as create new event loops. The default policy can be replaced with built-in alternatives to use different event loop implementations, or substituted by a custom policy that can override these behaviors.
Source code: Lib/pdb.py The module pdb defines an interactive source code debugger for Python programs. It supports setting (conditional) breakpoints and ...
| Download Python 3.15 documentation. Last updated on: Dec 06, 2026 (07:21 UTC). Download an archive containing all the documentation for this version of Python
If no script name was passed to the Python interpreter, argv[0] is the empty string. To loop over the standard input, or the list of files given on the command ...
The if, while and for statements implement traditional control flow constructs. try specifies exception handlers and/or cleanup code for a group of statements, while the with statement allows the execution of initialization and finalization code around a block of code.
bpo-23048: Fix jumping out of an infinite while loop in the pdb. ... error code and defers raising the SMTPServerDisconnected error until the next command is ...
For example, the length of word[1:3] is 2. Attempting to use an index that is too large will result in an errorThe while loop executes as long as the condition (here: a < 10) remains true. In Python, like in C, any non-zero integer value is true; zero is false.
Symbols · comment, [1], [2] · in doctests · in printf-style formatting, [1] · in regular expressions · in string formatting · source encoding declaration.
22 hours ago · This page is licensed under the Python Software Foundation License Version 2. Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
bpo-39883: Make code, examples, and recipes in the Python documentation be ... bpo-34630: Don't log SSL certificate errors in asyncio code (connection error ...