From: Python-list <[email protected]> on 
behalf of Irv Kalb <[email protected]>
Sent: Monday, April 16, 2018 10:03 AM
To: [email protected]
Subject: Instance variables question
    
> class PartyAnimal():
>     x = 0
> 
>     def party(self):
>         self.x = self.x + 1
>         print('So far', self.x)

Your not accessing the class variable here, self.x != PartyAnimal.x.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to