]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove most references to __members__ and __methods__, leaving only one pair
authorFred Drake <fdrake@acm.org>
Mon, 3 Dec 2001 17:32:27 +0000 (17:32 +0000)
committerFred Drake <fdrake@acm.org>
Mon, 3 Dec 2001 17:32:27 +0000 (17:32 +0000)
of references that now state that these attributes have been removed,
directing the reader to the dir() function.
This closes SF bug #456420.

Doc/api/newtypes.tex
Doc/lib/libfuncs.tex
Doc/lib/libstdtypes.tex
Doc/ref/ref3.tex

index 9bc18e2444d177ea4e0754a3a25dae3fc76ea36a..8ab8e3cdce3c139440f10dcfcdbd702c80a60fc8 100644 (file)
@@ -206,9 +206,9 @@ and \constant{METH_KEYWORDS} can be combined; the others can't.
 \begin{cfuncdesc}{PyObject*}{Py_FindMethod}{PyMethodDef table[],
                                             PyObject *ob, char *name}
   Return a bound method object for an extension type implemented in
-  C.  This function also handles the special attribute
-  \member{__methods__},  returning a list of all the method names
-  defined in \var{table}.
+  C.  This can be useful in the implementation of a
+  \member{tp_getattro} or \member{tp_getattr} handler that does not
+  use the \cfunction{PyObject_GenericGetAttr()} function.
 \end{cfuncdesc}
 
 
index 0ae7e5f12eb6f01705638b301f4b51378b77f7f0..29599224a9c611dcc37f914673f33168d8826ad8 100644 (file)
@@ -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:
index 4cf24a457da566c3890bd80b04f7bbbcffee1bcf..8a8125d822a08fb28c59a9451c71763707b9b60e 100644 (file)
@@ -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__}
index 9176ad1de22d0f22f46ca46d2e7b58ab3137ff89..778b54fc2fa4de0159293f6bfbf66828bd8cfd14 100644 (file)
@@ -112,17 +112,10 @@ numbers, efficiently stored arrays of integers, etc.).
 Some of the type descriptions below contain a paragraph listing
 `special attributes.'  These are attributes that provide access to the
 implementation and are not intended for general use.  Their definition
-may change in the future.  There are also some `generic' special
-attributes, not listed with the individual objects: \member{__methods__}
-is a list of the method names of a built-in object, if it has any;
-\member{__members__} is a list of the data attribute names of a built-in
-object, if it has any.
+may change in the future.
 \index{attribute}
 \indexii{special}{attribute}
 \indexiii{generic}{special}{attribute}
-\withsubitem{(built-in object attribute)}{
-  \ttindex{__methods__}
-  \ttindex{__members__}}
 
 \begin{description}