On 6/27/2011 4:24 AM, Antoine Pitrou wrote: > Le Mon, 27 Jun 2011 11:32:32 +1000, > Nick Coghlan<ncoghlan at gmail.com> a écrit : > >> "Members" is a historical relic that is best replaced by "attributes" >> or "data attributes" if we want to explicitly exclude methods for some >> reason. "Methods" is a subset of attributes that explicitly excludes >> data attributes. > > While I know it is technically right, I find it a bit strange to refer to > methods as "attributes". We're describing an API, not the inner working of > the object model. Also, people just discovering Python will probably be a > bit surprised if we start refer to methods as "attributes". > > FWIW, I tend to understand "members" as "methods + attributes", which makes > it a nice term to use for that purpose. 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." -- Terry Jan Reedy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4