Article 6TR97 A revamped Python string-formatting proposal

A revamped Python string-formatting proposal

by
jake
from LWN.net on (#6TR97)
The proposal to add a more general facility for string formatting toPython, which we looked at in August 2024,has changed a great deal since, so it merits another look. Thechanges take multiple forms: a new title for PEP750 ("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 evaluationof the interpolated values, has been changed so that it requires anexplicit opt-in (via lambda);template strings are a generalization of f-strings and lazy evaluation was seen by someas a potentially confusing departure from their behavior.
External Content
Source RSS or Atom Feed
Feed Location http://lwn.net/headlines/rss
Feed Title LWN.net
Feed Link https://lwn.net/
Reply 0 comments