
Feb. 21, 2020
3:12 p.m.
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