PEP 750: Tag Strings For Writing Domain-Specific Languages

Hi everybody, thanks for all the comments. We catalogued everything, talked it over, and made some decisions about changes. To make it easier: here’s an explainer. Next up: update the PEP.

Don’t wanna click? Here’s the top-line.

  • No more lazy evaluation of interpolations
  • No more tag functions, no more “tag”
  • Instead, a single t prefix which passes a Template to your function
  • Template.source which has the full-string
  • A normative section on how to signal the DSL to tools
  • Better examples and explanations of the need
22 Likes