For Questions and Answers, if you tag the question as a given language, any code blocks in the questions and answers will automatically have syntax highlighting applied for that language.
Is there something similar for documentation?
I added a topic to the Python Library documentation tag, but it's not auto-syntax highlighting my code as python.
EDIT:
It seems like the syntax highlighting is working on approved examples, but not examples pending review.
For example, in an answer
But in documentation
lang-py
is being applied to your code blocks on that page...