←back to thread

620 points tambourine_man | 1 comments | | HN request time: 0.207s | source
Show context
davepeck ◴[] No.43754220[source]
Hi! I wrote this. :-)

I'm a little late to the conversation (and a bit surprised to see this trending on HN) but am happy to answer any questions; I'll try to pop in throughout the day.

replies(3): >>43754275 #>>43754336 #>>43754430 #
varunneal ◴[] No.43754430[source]
Would be interested in inclusion of PEP 292 [1] in your discussion here, which introduced `string.Template`. Is this Template going to be deprecated?

[1] https://peps.python.org/pep-0292/

replies(1): >>43754467 #
1. davepeck ◴[] No.43754467[source]
PEP 292's `string.Template` will remain; there are no plans to deprecate it.

PEP 750's `string.templatelib.Template` is a separate and unrelated type. Amongst many differences, unlike PEP 292, `Template` has a literal form too.

I'm hopeful that the confusion will be minimal; in practice, PEP 292 (aka $-strings) is used only in specialized cases, like flufl.i18n, a really deep I18N framework.