pfalcon / utemplate

Micro template engine in Python with low memory usage, designed for Pycopy, a minimalist Python dialect, but also compatible with other Pythons.
https://github.com/pfalcon/pycopy
76 stars 8 forks source link

Comments in templates #12

Open doc-hex opened 4 years ago

doc-hex commented 4 years ago

Sure would be nice to have comments in templates. Jinja-style {# ... #} style.

At first, single-line comments... that would easy, just a "regex and done". But I also use them for commenting-out sections, so really they need to support multiple lines.

pfalcon commented 4 years ago

utemplate's aim is minimalism, and I myself didn't have a need for template comments so far. (Though I may imagine that my latest commits from https://github.com/pfalcon/utemplate/issues/12 could use comments to describe the feature inline in the template, instead of a commit message).

I may imagine a good proposal to add comments would start with surveying what other well-known Python template engines offer in that regard and what subset of that functionality makes sense to support (given the aim of minimalism).