An early stage PEP that introduces tag strings - a natural extension of "f-strings" from PEP 498 which enables Python developers to create and use their own custom tags (or prefixes) when working with string literals and any interpolation. Tag strings are based on a related idea in JavaScript, tagged template literals but with a Pythonic syntax for both the use of and the definition of tags.
Want to read about how tag strings work and how to use them?
Want to write a little code to experiment with tag strings?
Click this link to open an example notebook in your browser. No installation is required.
Want to dive a little deeper and/or write code outside of a notebook?
This repository supports GitHub Codespaces.
With a single click, you can spin up a full browser-based development environment using vscode, and backed by a running container image with all the necessary development tools. No local installation is necessary, but you do need a GitHub account.
- Click the "Code" button on the home page for this repo
- Click the "Codespaces" tab
- Click "Create codespace on main"
- After things spin up, you'll have vscode in your browser, attached to cloud dev environment
- Open a terminal in vscode (
ctrl
+shift
+`
) make install
- Try it!
python src/tagstr_site/htmldom.py
If you have vscode and Docker installed locally, you can:
- Clone this repository
- Open it in
vscode
- When prompted by
vscode
, click the "Re-open in Container" button - Open a terminal in vscode (
ctrl
+shift
+`
) make install
- Try it!
python src/tagstr_site/htmldom.py
- Tutorial documents, including the HTML tutorial
- Tutorial notebooks
- WIP PEP
- WIP
cpython
implementation based on 3.14
- Flufl i18n substitutions
- Tagged library
- PEP 501: Interpolation templates
- Earlier work by the same authors
This repo has a /docker/
submodule that contains dockerfiles used to build Lysandros' underlying cpython branch. Koudai manages the submodule and also has published the images to a registry at https://hub.docker.com/r/koxudaxi/python to make them easier to use.