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

Terry Reedy tjreedy at udel.edu
Tue Jun 28 00:18:29 CEST 2011

On 6/27/2011 2:33 PM, Terry Reedy wrote:

> Let me repeat that that is historically wrong for Python, and illustrate
> why the term 'members' should not be used. From the 1.5 Language
> Reference, 3.2 Standard type hierarchy: "There are also some 'generic'
> special attributes, not listed with the individual objects: __methods__
> is a list of the method names of a built-in object, if it has any;
> __members__ is a list of the data attribute names of a built-in object,
> if it has any."

This sentence was left untouched until 2.2. What's new 2.2 has "In 
previous versions of Python, there was no consistent way to discover 
what attributes and methods were supported by an object. There were some 
informal conventions, such as defining __members__ and __methods__ 
attributes that were lists of names, but often the author of an 
extension type or a class wouldn't bother to define them."
This is a section on descriptors, but the real replacement is, I 
believe, dir().

Terry Jan Reedy

More information about the Python-Dev mailing list