[Python-checkins] CVS: python/dist/src/Doc/lib libinspect.tex,1.4,1.5

Tim Peters tim_one@users.sourceforge.net
Fri, 21 Sep 2001 23:10:57 -0700


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

Modified Files:
	libinspect.tex 
Log Message:
Add a function to compute a class's method resolution order.  This is
easy for 2.2 new-style classes, but trickier for classic classes, and
different approaches are needed "depending".  The function will allow
later code to treat all flavors of classes uniformly.


Index: libinspect.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libinspect.tex,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** libinspect.tex	2001/08/10 17:37:33	1.4
--- libinspect.tex	2001/09/22 06:10:55	1.5
***************
*** 239,243 ****
  \begin{funcdesc}{formatargspec}{args\optional{, varargs, varkw, defaults,
        argformat, varargsformat, varkwformat, defaultformat}}
!   
    Format a pretty argument spec from the four values returned by
    \function{getargspec()}.  The other four arguments are the
--- 239,243 ----
  \begin{funcdesc}{formatargspec}{args\optional{, varargs, varkw, defaults,
        argformat, varargsformat, varkwformat, defaultformat}}
! 
    Format a pretty argument spec from the four values returned by
    \function{getargspec()}.  The other four arguments are the
***************
*** 252,255 ****
--- 252,263 ----
    corresponding optional formatting functions that are called to turn
    names and values into strings.
+ \end{funcdesc}
+ 
+ \begin{funcdesc}{getmro}{cls}
+   Return a tuple of class cls's base classes, including cls, in
+   method resolution order.  No class appears more than once in this tuple.
+   Note that the method resolution order depends on cls's type.  Unless a
+   very peculiar user-defined metatype is in use, cls will be the first
+   element of the tuple.
  \end{funcdesc}