DEV Community

loading...

Discussion on: Distinguishing Instance Variables from Class Variables in python

Collapse
ogwurujohnson profile image
Johnson Ogwuru Author • Edited

So whenever you need to create a variable that needs to be shared by all instances or methods in a class, then and only then it makes sense to use class variables

Forem Open with the Forem app