I am moving from Java to Python. In Java, Static variables will return the same value to all objects of a class even if it is changed by another object of the same class. In the Python book that I'm reading, the author says, a data member is entered into class namespace if it's assignment takes place within the immediate scope of the class definition.
I'm using IDLE, the Python Interpreter, and below is the Python code:
class ABC:
OVRLIMIT_FEE=5
>>> a=ABC()
>>> b=ABC()
>>> a.OVRLIMIT_FEE+=1
>>> a.OVRLIMIT_FEE
6
>>> b.OVRLIMIT_FEE
5
But if it enters the class namespace, should it not return same value when it is accessed with both a and b ?