A revamped Python string-formatting proposal
Date:
Wed, 22 Jan 2025 18:08:05 +0000
Description:
The proposal to add a more general facility for string formatting to
Python, which we looked at in August 2024,
has changed a great deal since, so it merits another look. The
changes take multiple forms: a new title for PEP
750 ("Template Strings"), a different mechanism for creating and using templates,
a new Template type to hold them, and several additional authors for the PEP. Meanwhile, one controversial part of the original proposal, lazy evaluation
of the interpolated values, has been changed so that it requires an
explicit opt-in (via lambda );
template strings are a generalization of f-strings and lazy evaluation was seen by some
as a potentially confusing departure from their behavior.
======================================================================
Link to news story:
https://lwn.net/Articles/1005000/
--- Mystic BBS v1.12 A47 (Linux/64)
* Origin: tqwNet UK HUB @ hub.uk.erb.pw (1337:1/100)