Attribute

An attribute defines a property of an object, element, or file.

Python Example

# Define a class containing a pi constant and inheriting the object class.
class Circle(object):
    PI = 3.14159
    
    def __init__(self, radius):
        self.radius = radius
        
    def area(self):
        return Circle.PI * self.radius
        

# Create a circle object without having to define pi.
smallcircle = Circle(3)
pi = smallcircle.PI