Article 6Q156 [$] Custom string formatters in Python

[$] Custom string formatters in Python

by
daroc
from LWN.net on (#6Q156)

Python has hadformatted string literals(f-strings), a syntactic shorthand for buildingstrings, since 2015. Recently, Jim Baker, Guido van Rossum, and Paul Everitt haveproposedPEP 750 ("Tag Strings For Writing Domain-Specific Languages") which wouldgeneralize and expand that mechanism to provide Python library writers with additionalflexibility. Reactions to the proposed change were somewhat positive, althoughthere was a good deal of discussion of (and opposition to)the PEP's inclusion of lazy evaluation of template parameters.

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