I doubt this is intentional – it‘s [syntax highlighting](https://askubuntu.com/editing-help#syntax-highlighting), in this case added automatically with the [tag:python] tag, see [its Tag Info](https://askubuntu.com/tags/python/info):

> Code Language (used for [syntax highlighting](https://github.com/google/code-prettify)): lang-py