Changeset 388 for python/vendor/current/Lib/anydbm.py
- Timestamp:
- Mar 19, 2014, 11:11:30 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/vendor/current/Lib/anydbm.py
r2 r388 30 30 31 31 Future versions may change the order in which implementations are 32 tested for existence, a dd interfaces to other dbm-like32 tested for existence, and add interfaces to other dbm-like 33 33 implementations. 34 35 The open function has an optional second argument. This can be 'r',36 for read-only access, 'w', for read-write access of an existing37 database, 'c' for read-write access to a new or existing database, and38 'n' for read-write access to a new database. The default is 'r'.39 40 Note: 'r' and 'w' fail if the database doesn't exist; 'c' creates it41 only if it doesn't exist; and 'n' always creates a new database.42 43 34 """ 44 35 … … 64 55 error = tuple(_errors) 65 56 66 def open(file, flag = 'r', mode = 0666): 57 def open(file, flag='r', mode=0666): 58 """Open or create database at path given by *file*. 59 60 Optional argument *flag* can be 'r' (default) for read-only access, 'w' 61 for read-write access of an existing database, 'c' for read-write access 62 to a new or existing database, and 'n' for read-write access to a new 63 database. 64 65 Note: 'r' and 'w' fail if the database doesn't exist; 'c' creates it 66 only if it doesn't exist; and 'n' always creates a new database. 67 """ 68 67 69 # guess the type of an existing database 68 70 from whichdb import whichdb
Note:
See TracChangeset
for help on using the changeset viewer.