[Python-Dev] Issue10403 - using 'attributes' instead of members in documentation (original) (raw)
Fred Drake fdrake at acm.org
Tue Jun 28 13:04:11 CEST 2011
- Previous message: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation
- Next message: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Jun 28, 2011 at 6:54 AM, Michael Foord <fuzzyman at voidspace.org.uk> wrote:
Added to which there are other descriptors, notably property, that are not directly callable but are not provided as normal "data attributes" (although the access syntax is the same). Properties are much closer to methods as they are implemented on the class and fetched via the descriptor protocol. Instead of "data attributes" I prefer the term "instance attributes" although that doesn't include "class attributes" (or more precisely it doesn't cover "class attributes that aren't descriptors").
Given the availability of getattr and getattribute, I consider properties an implementation detail for some attributes. The fact that Python code is called on access is only marginally interesting.
The problem with "data attributes" is that it doesn't mean anything, which I suppose is useful for invented terminology, but it means it doesn't convey anything precise to those who haven't heard the term before. If it becomes widely used then that changes I guess. I'd still normally just use "attributes" though...
I'd read "data attributes" the same as "non-method attributes". For readers, calling them "attributes" is typically sufficient. It's rare to need to distinguish them from methods.
-Fred
-- Fred L. Drake, Jr. "Give me the luxuries of life and I will willingly do without the necessities." --Frank Lloyd Wright
- Previous message: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation
- Next message: [Python-Dev] Issue10403 - using 'attributes' instead of members in documentation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]