I'm a bit confused as to how variables (or fields) of classes are handled in python.
I'll give a small example of what I mean.
class Cow: # the first class that popped into my head legs = 4 moo = cow()
moo.legs will return 4
and cow.legs will also return 4
Now although legs is a class variable it appears that every object created by Cow has a variable called legs. Wouldn't that make the concept of a class variable obsolete? Why should every object of that class have a variable called legs? If the programmer wanted to do that wouldn't it be more suitable to write an __init__ function such as
self.legs = 4?