I bet there is an answer around, but unfortunately, I couldn't find it. When playing with classes, I found the following behaviour:
class C:
i = 1
a = C()
b = C()
d = C()
b.i = 3
d.i = 4
print(C.i) # -> 1
print(a.i) # -> 1
print(b.i) # -> 3
print(d.i) # -> 4
d.i = 1
print(d.i) # -> 1
C.i = 5
print(C.i) # -> 5
print(a.i) # -> 5
print(b.i) # -> 3
print(d.i) # -> 1
Only the instances' class attributes, which weren't changed already, can be altered by changing the Class' class attribute. How is this behaviour internally checked? Is there a name for further reading?
Thanks!