[Python-Dev] Issue10403 - using 'attributes' instead of members in documentation
R. David Murray
rdmurray at bitdance.com
Mon Jun 27 22:37:21 CEST 2011
On Mon, 27 Jun 2011 20:30:12 +0100, Michael Foord <fuzzyman at voidspace.org.uk> wrote:
> On 27/06/2011 20:22, R. David Murray wrote:
> > [snip...]
> > So, the correct generic term for something that can be accessed
> > via attribute notation is attribute. The more specific term for an
> > attribute that is a method is method. We don't currently have a more
> > specific collective term for attributes that aren't methods. *That*
> > is the problem.
>
> I think part of the problem is also that *some* people's usage of the
> term doesn't match the precise terminology.
>
> It sounds like if I say "an object's attributes" some of us will expect
> that to include the methods and some of us not. I'd say anecdotally that
> when people talk about object attributes collectively they are *not*
> including methods. When they talk about attribute lookup that rightly
> includes everything.
Yes, I think that it is common to use 'attributes' to mean 'non-method
attributes', and often the context can make clear which usage is
intended. What we should do in our own docs is a different question,
but we do have other cases where "it is clear from context" is
considered a valid argument for technically imprecise terminology.
And I think that's reasonable.
> A precise term to describe "attributes that are not methods" would still
> be helpful. I guess the closest we have is "non-descriptors", but that
> requires a knowledge of the descriptor protocol for it to be useful.
I'm not really as comfortable as I think I should be with the descriptor
stuff, but aren't properties descriptors in the sense you are using it
here? Yet I don't think a property should be called a method, even though
it is implemented via a function(s) that looks a lot like a method. This is
why talking about non-method attributes collectively is so fraught....
--
R. David Murray http://www.bitdance.com
More information about the Python-Dev
mailing list