[Python-checkins] python/dist/src/Doc/lib libdbhash.tex, 1.5, 1.5.36.1

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Tue Sep 9 22:45:24 EDT 2003


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

Modified Files:
      Tag: release23-maint
	libdbhash.tex 
Log Message:
SF bug #802302:  Invalid documentation for dbhash.

The documentation severely departed for the actual implementation.



Index: libdbhash.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdbhash.tex,v
retrieving revision 1.5
retrieving revision 1.5.36.1
diff -C2 -d -r1.5 -r1.5.36.1
*** libdbhash.tex	27 Jun 2001 13:49:59 -0000	1.5
--- libdbhash.tex	10 Sep 2003 04:45:22 -0000	1.5.36.1
***************
*** 67,87 ****
  \end{methoddesc}
  
! \begin{methoddesc}[dbhash]{next}{key}
!   Returns the key that follows \var{key} in the traversal.  The
    following code prints every key in the database \code{db}, without
    having to create a list in memory that contains them all:
  
  \begin{verbatim}
! k = db.first()
! while k != None:
!     print k
!     k = db.next(k)
  \end{verbatim}
  \end{methoddesc}
  
! \begin{methoddesc}[dbhash]{previous}{key}
!   Return the key that comes before \var{key} in a forward-traversal of 
!   the database.  In conjunction with \method{last()}, this may be used 
!   to implement a reverse-order traversal.
  \end{methoddesc}
  
--- 67,86 ----
  \end{methoddesc}
  
! \begin{methoddesc}[dbhash]{next}{}
!   Returns the key next key in a database traversal.  The
    following code prints every key in the database \code{db}, without
    having to create a list in memory that contains them all:
  
  \begin{verbatim}
! print db.first()
! for i in xrange(1, len(d)):
!     print db.next()
  \end{verbatim}
  \end{methoddesc}
  
! \begin{methoddesc}[dbhash]{previous}{}
!   Returns the previous key in a forward-traversal of the database.
!   In conjunction with \method{last()}, this may be used to implement
!   a reverse-order traversal.
  \end{methoddesc}
  





More information about the Python-checkins mailing list