[Python-Dev] Issue10403 - using 'attributes' instead of members in documentation

Michael Foord fuzzyman at voidspace.org.uk
Tue Jun 28 12:54:39 CEST 2011


On 28/06/2011 11:44, Fred Drake wrote:
> On Tue, Jun 28, 2011 at 2:33 AM, Nick Coghlan<ncoghlan at gmail.com>  wrote:
>> The two terms I've got out of this thread are "callable attributes"
>> (instance/static/class methods, etc) and "data attributes" (everything
>> else). Both seem reasonable to me, creating two largely disjoint sets
>> that together cover all the different kinds of attribute you're likely
>> to encounter.
> But "callable attributes" aren't the same thing as methods; most are methods,
> but not all.  Sometimes, they're data used by the object.  The fact that
> data attributes can be callable is irrelevant.

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").

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...

All the best,

Michael Foord
>
>    -Fred
>


-- 
http://www.voidspace.org.uk/

May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html



More information about the Python-Dev mailing list