class Employee:
pay_raise_percent = 0
def __init__(self, name, salary):
self.name = name
self.salary = salary
p1 = Employee('John', 50_000)
p2 = Employee('Alex', 75_000)
p3 = Employee('Caleb', 90_000)
Employee.pay_raise_percent = 1.04
print(p1.salary, p2.salary, p3.salary, sep='\n')
# 52000 78000 93600
is it possible to make it so that changing a class attribute leads to an automatic increase in the salary of all instances by this value without doing that explicitly for each of them?