PEP750: Template Strings (new updates)

I’ve searched here, in PEP 750: Tag Strings For Writing Domain-Specific Languages - PEPs - Discussions on Python.org and the PEP itself and found no discussion on the naming of Template. That’s why I’m bringing up the question here - Addmittedly I haven’t read all posts but tried different search patterns, so I might have overlooked something. I’d be happy to see this has been discussed and decided before.

There’s always “import as” to handle any ambiguity.

Sure. The question is, what is the intended naming in user code. A single user can always do from string.templatelib import Template as TemplateStr to have a better name. But IMHO we shouldn’t generally recommend renaming via as if we have the possibility to choose the name ourselves. Naming is important. There are arguments for both Template and TemplateStr. I just want to make sure this decision is conscious.

1 Like