mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Remove most references to __members__ and __methods__, leaving only one pair
of references that now state that these attributes have been removed, directing the reader to the dir() function. This closes SF bug #456420.
This commit is contained in:
parent
248b04383f
commit
3570551d6f
4 changed files with 10 additions and 20 deletions
|
@ -205,8 +205,8 @@ def my_import(name):
|
|||
Without arguments, return the list of names in the current local
|
||||
symbol table. With an argument, attempts to return a list of valid
|
||||
attribute for that object. This information is gleaned from the
|
||||
object's \member{__dict__}, \member{__methods__} and \member{__members__}
|
||||
attributes, if defined. The list is not necessarily complete. For
|
||||
object's \member{__dict__} attribute, if defined, and from the class
|
||||
or type object. The list is not necessarily complete. For
|
||||
example, for classes, attributes defined in base classes are not
|
||||
included, and for class instances, methods are not included.
|
||||
The resulting list is sorted alphabetically. For example:
|
||||
|
|
|
@ -1390,16 +1390,13 @@ object's (writable) attributes.
|
|||
\end{memberdesc}
|
||||
|
||||
\begin{memberdesc}[object]{__methods__}
|
||||
List of the methods of many built-in object types. For example,
|
||||
\code{[].__methods__} yields \code{['append', 'count', 'index',
|
||||
'insert', 'pop', 'remove', 'reverse', 'sort']}. This usually does not
|
||||
need to be explicitly provided by the object.
|
||||
\deprecated{2.2}{Use the built-in function \function{dir()} to get a
|
||||
list of an object's attributes. This attribute is no longer available.}
|
||||
\end{memberdesc}
|
||||
|
||||
\begin{memberdesc}[object]{__members__}
|
||||
Similar to \member{__methods__}, but lists data attributes. This
|
||||
usually does not need to be explicitly provided by the object, and
|
||||
need not include the names of the attributes defined in this section.
|
||||
\deprecated{2.2}{Use the built-in function \function{dir()} to get a
|
||||
list of an object's attributes. This attribute is no longer available.}
|
||||
\end{memberdesc}
|
||||
|
||||
\begin{memberdesc}[instance]{__class__}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue