Marco Rougeth <[email protected]> added the comment:
Hi Terry, thanks for reviewing this and sorry for not being clear enough.
About dbm.gnu.open:
The docs indeed uses “flag”, in singular form, but it’s wrong because 1) the
argument accepts, for some cases, 2 flags and, 2) the source code uses “flags”
in plural form.
In [1]: import dbm.gnu
In [2]: help(dbm.gnu.open)
Help on built-in function open in module _gdbm:
open(filename, flags='r', mode=438, /)
[...]
If you continue to read the docstring, there's an explanation about the cases
where you can use two flags.
About dbm.ndbm.open:
For this one, the docs is also different from source code:
In [3]: import dbm.ndbm
In [4]: help(dbm.ndbm.open)
Help on built-in function open in module _dbm:
open(filename, flags='r', mode=438, /)
[...]
The scope of the patch on Github ends here. It only makes the documentation
consistent to the source code.
What I wanted to point out is that, in the case of ndbm.open, it accepts a
flags option (in plural form) when it actually accepts only one. And since
changing it would not make any difference from an user perspective, I believe
we should go for it.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36322>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com