[Python-checkins] CVS: python/dist/src/Doc/api api.tex,1.143,1.144

Tim Peters tim_one@users.sourceforge.net
Tue, 04 Sep 2001 15:08:58 -0700


Update of /cvsroot/python/python/dist/src/Doc/api
In directory usw-pr-cvs1:/tmp/cvs-serv11322/python/Doc/api

Modified Files:
	api.tex 
Log Message:
At Guido's suggestion, here's a new C API function, PyObject_Dir(), like
__builtin__.dir().  Moved the guts from bltinmodule.c to object.c.


Index: api.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/api/api.tex,v
retrieving revision 1.143
retrieving revision 1.144
diff -C2 -d -r1.143 -r1.144
*** api.tex	2001/08/30 15:24:17	1.143
--- api.tex	2001/09/04 22:08:55	1.144
***************
*** 1721,1724 ****
--- 1721,1734 ----
  \end{cfuncdesc}
  
+ \begin{cfuncdesc}{PyObject*}{PyObject_Dir}{PyObject *o}
+ This is equivalent to the Python expression \samp{dir(\var{o})},
+ returning a (possibly empty) list of strings appropriate for the
+ object argument, or \NULL{} in case of error.
+ If the argument is \NULL{}, this is like the Python \samp{dir()},
+ returning the names of the current locals; in this case, if no
+ execution frame is active then \NULL{} is returned but
+ \cfunction{PyErr_Occurred()} will return false.
+ \end{cfuncdesc}
+ 
  
  \section{Number Protocol \label{number}}