Variables vs attributes [was Re: Inheriting dictionary attributes and manipulate them in subclasses]
Steven D'Aprano
steve at REMOVE-THIS-cybersource.com.au
Fri Apr 17 23:56:13 EDT 2009
On Fri, 17 Apr 2009 17:48:55 +0200, Diez B. Roggisch wrote:
> No, because you are creating *classvariables* when declaring things like
> this:
...
> OTOH, when assigning to an instance, this will create an
> *instance*-variable. Which is what
If an integer variable is an integer, and a string variable is a string,
and float variable is a float, and a list variable is a list (there's a
pattern here), shouldn't a class variable be a class and an instance
variable be an instance?
I had never noticed the usage of "variable" to mean attribute until a few
months ago. What's going on? Why did people decide that confusing
variables and attributes of variables was a good thing? What's next,
describing dictionary keys as "dictionary variables"?
Sorry to pick on Diez, he's not the only one, just the latest example.
--
Steven
More information about the Python-list
mailing list