What color space is used to calculate color values in Python?

Starting with version 2.10, some color calculations, such as layer modes, are performed in linear RGB. However, the color values displayed in the UI are still based on the TRC-applied RGB. Is the color space still TRC-applied RGB, in which color calculations are performed with Python?

AFAIK everything is computed in linear light, except the โ€œlegacyโ€ blend modes.

Thank you. As you said I confirmed everything is computed in linear light.