[1] https://pep-previews--4124.org.readthedocs.build/pep-0750/
[2] https://htpy.dev
[1] https://pep-previews--4124.org.readthedocs.build/pep-0750/
[2] https://htpy.dev
The nice thing about Blazor is you can either have your templates as WASM, or have them be back-end driven, and Blazor does a bit of the gluing for you so your site updates as things happen and need to be updated, like Phoenix LiveView.
The problem with templates in general is you can write malformed HTML in them. The nice thing about htpy et al is you simply can't do that. I feel like what we really want is JSX in Python, where you can write XML-like syntax and it's converted into Python at import time.
In the end, my instinct is that t-strings are the better more generic feature to add to the language itself today.
That said, I'd love to see the Python ecosystem get to the point where it's relatively easy to implement transpilers and get new grammars integrated with key tools (colorizers, formatters, linters, type checkers, etc). After that: let a thousand JSX-likes bloom.