[issue36322] Argument typo in dbm.ndbm.open

2019-04-02 Thread Brett Cannon


Brett Cannon  added the comment:

So Terry is correct in so much as there is no parameter name. :) Both of the 
functions in question are positional-only, so the name actually doesn't matter 
beyond giving a way to reference the parameter in the documentation.

So thanks for the PR, Marco, but I'm going to reject this as there's nothing 
actually wrong with the gdbm or ndbm docs.

--
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36322] Argument typo in dbm.ndbm.open

2019-04-02 Thread Brett Cannon


Brett Cannon  added the comment:

Actually, it's even more subtle as the arguments are positional-only.

--
nosy: +brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36322] Argument typo in dbm.ndbm.open

2019-03-23 Thread Marco Rougeth

Marco Rougeth  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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36322] Argument typo in dbm.ndbm.open

2019-03-22 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I have trouble understanding this post.  The parameter name is 'flag', not 
'flags' and there are no typos, including in ndbm.  The parameter name is 
singular because there is basically one flag with 4 possible values to indicate 
how to open.  The fact that gdbm has optional subflags does not require 
changing the name and I think it better to keep the documented API the same.

The only time 'flags' appears is in "Not all flags are valid for all versions 
of gdbm. The module constant open_flags is a string of supported flag 
characters."  Here, 'flags' refers to the multiple possible values for the 
'flag' argument, not the argument itself.

I think that this issue and the PR should be closed.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36322] Argument typo in dbm.ndbm.open

2019-03-22 Thread Marco Rougeth


Change by Marco Rougeth :


--
keywords: +patch
pull_requests: +12453
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36322] Argument typo in dbm.ndbm.open

2019-03-16 Thread Marco Rougeth


Change by Marco Rougeth :


--
title: Argument typo in dam.ndbm.open -> Argument typo in dbm.ndbm.open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com