Skip to content

Support for PEP 750 a.k.a. "t-strings" #104

@pelme

Description

@pelme

PEP 750 is accepted and will be part of Python 3.14(?).

We could add a html() function to htpy that takes a t-string and turns it into htpy objects, like html(t"<div>hi {name}</div>"). The signature would be def html(template: Template) -> htpy.Renderable: .... Since it returns htpy objects, it could be mixed with "regular" htpy objects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions