Runtime Data Attributes

type.__static_attributes__

Python 3.13 class metadata for names assigned through self.name in functions defined in the class body. It is not an exhaustive runtime attribute inventory.

Formal Syntax & Structure

python syntaxpython
Cls.__static_attributes__

Return Value

tuple[str, ...]

Value exposed by this attribute; availability and mutability depend on the owner as described.

Working Example

Example Snippetpython
class C:    def __init__(self):        self.x = 1        self.y = 2print(tuple(sorted(C.__static_attributes__)))
Python Reference