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

[$] A revamped Python string-formatting proposal

mercredi 22 janvier 2025, 19:08 , par 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/

Voir aussi

News copyright owned by their original publishers | Copyright © 2004 - 2025 Zicos / 440Network
Date Actuelle
mar. 28 janv. - 03:30 CET