[issue36322] Argument typo in dam.ndbm.open

2019-03-16 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
nosy: +remi.lapeyre

___
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 dam.ndbm.open

2019-03-16 Thread Marco Rougeth

New submission from Marco Rougeth :

Reading the documentation for `dbm.gnu.open` I noticed that there were a typo 
in the `flags` argument, it was documented as `flag`, in plural form.

The same typo was present for `dbm.ndbm.open`, but in this case, `flag` makes 
more sense than `flags`, since the function accepts only one option as a flag.

I opened a PR [1] fixing both typos, but I’d like to discuss if makes sense to 
rename the argument on `dbm.ndbm.open` from `flags` to `flag`. As point out by  
@remilapeyre, this change would be backwards compatible, since we cannot use 
the function with keyword arguments.

>>> dbm.ndbm.open(filename=‘foo’, flags=‘r’, mode=438)
Traceback (most recent call last):
  File “”, line 1, in 
TypeError: open() takes no keyword arguments

What do you folks think about it?

1 - https://github.com/python/cpython/pull/12095

--
messages: 338097
nosy: rougeth
priority: normal
severity: normal
status: open
title: Argument typo in dam.ndbm.open
type: enhancement

___
Python tracker 

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