Instance vs Class variable oddity

Ethan Furman ethan at stoneleaf.us
Fri May 17 14:45:26 EDT 2019


On 05/17/2019 11:37 AM, Irv Kalb wrote:

> self.x = self.x + 1
> 
> I have never run across this issue because I would never use the same name as an instance attribute and a class attribute.

So you treat your class attributes as if they were static?

--
~Ethan~



More information about the Python-list mailing list