attribute

A named value attached to an object and reached with a dot, such as point.x or math.pi; methods are attributes too.

In more detail

Instance attributes are usually set in __init__ through self; class attributes are set in the class body and shared by all instances. Asking for one that does not exist raises AttributeError.

Related terms

Taught in

References