MacMusic  |  PcMusic  |  440 Software  |  440 Forums  |  440TV  |  Zicos
proposal
Search

A revamped Python string-formatting proposal

Wednesday January 22, 2025. 07:08 PM , from LWN.net
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.
https://lwn.net/Articles/1005000/

Related News

News copyright owned by their original publishers | Copyright © 2004 - 2025 Zicos / 440Network
Current Date
Jan, Mon 27 - 20:33 CET