Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fc1f64d

Browse files
committed
Oops, I had 'n' and 'c' mixed up in my mind. Get rid of the comment
that wonders what the difference is and explain them properly.
1 parent a5c0998 commit fc1f64d

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

Lib/anydbm.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@
3434
3535
The open function has an optional second argument. This can be 'r',
3636
for read-only access, 'w', for read-write access of an existing
37-
database, 'n' or 'c' for read-write access to a new database. The
38-
default is 'r'.
37+
database, 'c' for read-write access to a new or existing database, and
38+
'n' for read-write access to a new database. The default is 'r'.
3939
40-
Note: the difference between 'w' and 'n' is that 'w' fails if the
41-
database doesn't already exist. There appears to be no difference
42-
between 'n' and 'c'.
40+
Note: 'r' and 'w' fail if the database doesn't exist; 'c' creates it
41+
only if it doesn't exist; and 'n' always creates a new database.
4342
4443
"""
4544

0 commit comments

Comments
 (0)