May I suggest mark string with comments instead of populating the interpreter 
with lost of "string" templates?

Something like
"SELECT * FROM table"  # string: sql

Or
"<p><strong>spam</strong> ham eggs</p>  # template: html


IDEs can read this comment and highlight (and do some other static checks) on 
the commented strings.

It can be easily combined with raw strings and f-strings such as:

f"<p><strong>{my_string}</strong> ham</p>"  # doctype: html
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/7FWPN7GFZNRQ7YCV35DJAOSL7XKXIFMM/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to