[Python-ideas] Draft PEP on string interpolation

Nick Coghlan ncoghlan at gmail.com
Mon Aug 24 11:48:05 CEST 2015


On 24 August 2015 at 18:51, Mike Miller <python-ideas at mgmiller.net> wrote:
>
> On 08/23/2015 06:41 PM, Nick Coghlan wrote:
>>
>> You hit a similar problem if you're targeting Django or Jinja2
>> templates, or any content that involves l20n style JavaScript
>> translation strings: the use of braces for substitution expressions in
>
> Hi, this part I don't get, maybe because it's so late here.  Why create
> Django/Jinja2/i20n templates inside Python code using another templating
> language (whether Template or .format)?
>
> Those kind of templates should be in dedicated text files, no?

Think of meta-templating tools like cookie-cutter or DevAssistant (or
the project wizards in an IDE) - for those kinds of tools, "source
file formats" are actually output formats. Once you look at enough
different parts of the software development pipeline you find that
pretty much *every* input format is an output format for some other
tool :)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-ideas mailing list