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

Nick Coghlan ncoghlan at gmail.com
Mon Jun 27 16:32:59 CEST 2011


On Tue, Jun 28, 2011 at 12:08 AM, R. David Murray <rdmurray at bitdance.com> wrote:
> While I agree that using 'attribute' when only methods are being discussed
> would most likely be confusing, and that it can be tricky to clearly
> word things when both are being discussed, the existence in the language
> of getattr, setattr, and related methods argues against using the term
> 'members'.

Yep, to me "attribute" just means "something that can be accessed
using attribute notation". What it actually *is* is completely up for
grabs at that point.

> 'data attributes' can so easily become something else in Python...it
> seems to me that the only real difference between 'data attributes' and
> 'method attributes' in Python is that the latter can be called and the
> former can't.  But even that is not an accurate distinction, since a
> 'data attribute' could, in fact, return a callable.
>
> I guess what I'm saying is that I am more comfortable calling them
> all attributes than calling them all members.  The term 'members'
> isn't used anywhere in the language itself, as far as I can recall,
> whereas getattr and setattr are evidence that the language considers
> them all attributes.  I think we do the documentation readers a
> disservice by obscuring that fact by using other terminology.

It's worse than that - the specific meaning of "members" in the
context of Python's history specifically *excludes* methods.

The superset is "attributes" - as noted, the names of the builtins and
magic methods make that terminology quite explicit.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list