[Python-checkins] python/dist/src/Lib dumbdbm.py,1.15.4.1,1.15.4.1.2.1

rhettinger@users.sourceforge.net rhettinger@users.sourceforge.net
Wed, 29 May 2002 16:19:45 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv1582

Modified Files:
      Tag: release22-maint
	dumbdbm.py 
Log Message:
Backport change to 1.18 adding docstrings

Index: dumbdbm.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/dumbdbm.py,v
retrieving revision 1.15.4.1
retrieving revision 1.15.4.1.2.1
diff -C2 -d -r1.15.4.1 -r1.15.4.1.2.1
*** dumbdbm.py	21 Dec 2001 05:29:45 -0000	1.15.4.1
--- dumbdbm.py	29 May 2002 23:19:43 -0000	1.15.4.1.2.1
***************
*** 151,158 ****
          if self._index is not None:
              self._commit()
!   
  
  
  def open(file, flag=None, mode=0666):
      # flag, mode arguments are currently ignored
      return _Database(file, mode)
--- 151,170 ----
          if self._index is not None:
              self._commit()
! 
  
  
  def open(file, flag=None, mode=0666):
+     """Open the database file, filename, and return corresponding object.
+ 
+     The flag argument, used to control how the database is opened in the
+     other DBM implementations, is ignored in the dumbdbm module; the
+     database is always opened for update, and will be created if it does
+     not exist.
+ 
+     The optional mode argument is the UNIX mode of the file, used only when
+     the database has to be created.  It defaults to octal code 0666 (and
+     will be modified by the prevailing umask).
+ 
+     """
      # flag, mode arguments are currently ignored
      return _Database(file, mode)