PEP 827 – Type Manipulation - Python Enhancement Proposals
Feb 27, 2026 ... We will present a few examples of problems that could be solved with more powerful type manipulation, but the proposal is generic and will ...
Feb 27, 2026 ... We will present a few examples of problems that could be solved with more powerful type manipulation, but the proposal is generic and will ...
array.array — a JSON Array of numbers, or a compact encoded string? The sensible answer even depends on its type code. datetime — which of the many string representations (ISO 8601 variants, epoch seconds, RFC formats)?
We believe that adding pattern matching to Python will enable Python users to write cleaner, more readable code for examples like those above, and many ...
PEP 498: Literal String Interpolation, which proposed “formatted strings” was accepted September 9th, 2015. Additional background and rationale given during its design phase is detailed below.
Python currently provides two methods of string interpolationThe primary purpose of this code example is to illustrate the order in which overridable methods are called. Customizing Formatters. This section describes some typical ways that Formatter objects can be customized.
Motivating examples from the Python standard library. The examples below demonstrate how the proposed methods can make code one or more of the followingThe code does not require a call to the Python built-in len function nor to the more expensive str.replace() method.