VSCode has syntax highlighting for the Python language. I can't find any explanation for how each token is classified and organized into colors.
Specifically, why are some keywords the same color, but some are different.
Looking at this code:
for...in shows the keywords as the same color, but if...in shows the keywords as different colors. Why does in change color? What determines if a keyword is purple or blue or something else?
Finally, is there an exhaustive list or chart for how keywords are organized?
Update
From the first link in @JillCheng's answer I found the Scope Inspector, which can be enabled by running Developer: Inspect Editor Tokens and Scopes in the command palette. This will then show how the currently selected text was tokenized.
for...in shows both keywords are tokenized as keyword.control.flow.python.
if...in shows if as keyword.control.flow.python and in as keyword.operator.logical.python.
