Message338673
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. |
|
Date |
User |
Action |
Args |
2019-03-23 12:12:22 | rougeth | set | recipients:
+ rougeth, terry.reedy, remi.lapeyre |
2019-03-23 12:12:22 | rougeth | set | messageid: <1553343142.63.0.49954096436.issue36322@roundup.psfhosted.org> |
2019-03-23 12:12:22 | rougeth | link | issue36322 messages |
2019-03-23 12:12:22 | rougeth | create | |
|