Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

In tuple structs, the fields are not named but indexed.

As an example, here is a Color tuple struct that defines an RGB color on 8-bit values. The declaration uses parenthesis instead of curly braces:

For defining an instance we use also parenthesis and specify the values in the order of definition:

To access values from an instance, we use integer indices:

red=255, green=255, blue=0