tagstr-site

Demos and docs for the draft PEP on tag strings in Python.

Stars
0

Tag strings

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.

Try tag strings today!

Tutorial

Want to read about how tag strings work and how to use them?

Read the tutorial here.

JupyterLite notebooks

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.

Using GitHub Codespaces

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.

  1. Click the "Code" button on the home page for this repo
  2. Click the "Codespaces" tab
  3. Click "Create codespace on main"
  4. After things spin up, you'll have vscode in your browser, attached to cloud dev environment
  5. Open a terminal in vscode (ctrl + shift + `)
  6. make install
  7. Try it! python src/tagstr_site/htmldom.py

Using your local dev machine

If you have vscode and Docker installed locally, you can:

  1. Clone this repository
  2. Open it in vscode
  3. When prompted by vscode, click the "Re-open in Container" button
  4. Open a terminal in vscode (ctrl + shift + `)
  5. make install
  6. Try it! python src/tagstr_site/htmldom.py

Documents

Related Work

cpython docker images

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.