summaryrefslogtreecommitdiff
path: root/Lib/anydbm.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-08-11 14:18:27 +0000
committerGuido van Rossum <guido@python.org>1995-08-11 14:18:27 +0000
commita8f68d52e2f9d682baa71ff57751c008a9a5c6be (patch)
treea69cab5183a5a5fa4fc14e6d58684baddd22e19a /Lib/anydbm.py
parent70dc02ce3ca7fe4e6f477151586fa382fabc74a8 (diff)
downloadcpython-a8f68d52e2f9d682baa71ff57751c008a9a5c6be.tar.gz
change default flag to match dbm/gdbm
Diffstat (limited to 'Lib/anydbm.py')
-rw-r--r--Lib/anydbm.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/anydbm.py b/Lib/anydbm.py
index a3451f57d3..72dd19574b 100644
--- a/Lib/anydbm.py
+++ b/Lib/anydbm.py
@@ -31,8 +31,8 @@ decide which module to use based upon the extension or contents of an
existing database file.
The open function has an optional second argument. This can be set to
-'r' to open the database for reading only. The default is 'w', which
-differs from the dbm default ('r') for historic reasons.
+'r' to open the database for reading only. The default is 'r', like
+the dbm default.
"""
@@ -47,5 +47,5 @@ for _name in _names:
break
else:
raise ImportError, "no dbm clone found; tried %s" % _names
-def open(file, flag = 'w', mode = 0666):
+def open(file, flag = 'r', mode = 0666):
return _mod.open(file, flag, mode)