Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1035a89 commit e03a86cCopy full SHA for e03a86c
1 file changed
Lib/anydbm.py
@@ -31,8 +31,8 @@
31
existing database file.
32
33
The open function has an optional second argument. This can be set to
34
-'r' to open the database for reading only. The default is 'w', which
35
-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.
36
37
"""
38
@@ -47,5 +47,5 @@
47
break
48
else:
49
raise ImportError, "no dbm clone found; tried %s" % _names
50
-def open(file, flag = 'w', mode = 0666):
+def open(file, flag = 'r', mode = 0666):
51
return _mod.open(file, flag, mode)
0 commit comments