# Language hints for PEP 750 template strings

**URL:** <https://discuss.python.org/t/language-hints-for-pep-750-template-strings/94311>\
**Category:** Typing\
**Created:** [June 3, 2025, 2:50pm UTC](https://discuss.python.org/t/language-hints-for-pep-750-template-strings/94311 "2025-06-03T14:50:24Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![koxudaxi](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/koxudaxi/32/22098_2.png) [@koxudaxi](https://discuss.python.org/u/koxudaxi)\
**Post date:** [June 7, 2025, 1:18am UTC](https://discuss.python.org/t/language-hints-for-pep-750-template-strings/94311/10 "2025-06-07T01:18:24Z")

</div>

@thejcannon  
I also considered this idea, but I skipped it due to several concerns that I think would arise.

If we provide syntax highlighting for literals, it would encourage users to write SQL or HTML in them. However, I believe doing this for strings other than t-strings would not be good practice. For example, if we enable SQL syntax highlighting for f-strings, there is a risk that users might write f-strings with SQL injection vulnerabilities or related unsafe code.

Additionally, this relates to the discussion at [PEP 750: disallow str + Template](https://discuss.python.org/t/pep-750-disallow-str-template/90281). If users write SQL in regular string literals, they might combine them with f-strings or other strings, which could also lead to code with SQL injection vulnerabilities.

I might be overthinking this, so I would appreciate any helpful opinions on this matter.

---

_[View the full topic](https://discuss.python.org/t/language-hints-for-pep-750-template-strings/94311)._
