This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: get method for dbm interface
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.2
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Improve dbm modules
View: 9523
Assigned To: Nosy List: Kain94, eric.araujo, georg.brandl, ysj.ray
Priority: normal Keywords:

Created on 2010-05-06 08:09 by Kain94, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (6)
msg105130 - (view) Author: Benjamin VENELLE (Kain94) Date: 2010-05-06 08:09
I'm suggesting to add the dict's 'get' method to dbm interface. So that, it would be easier to manage 'key not found' issues.

B. Venelle.
msg112400 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-08-01 23:01
dbm.ndbm already has get().  dbm.gnu is missing it.
msg112403 - (view) Author: Benjamin VENELLE (Kain94) Date: 2010-08-01 23:29
Yes I know, that's why get() should be a standard dbm's method like __getitem__() and __setitem__(). So, defining it in all classes which implements dbm interface would be a good enhancement.
msg112484 - (view) Author: ysj.ray (ysj.ray) Date: 2010-08-02 14:58
+1 on generalize the dbm.gnu and gbm.ndbm, and also dbm.dumb. All of them should follow the Collections.MutableMapping ABC. I will work out a patch to fix this.
msg112990 - (view) Author: ysj.ray (ysj.ray) Date: 2010-08-05 15:24
See issue9523.
msg121003 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-11-12 01:14
The other bug report adds the get method as part of MutableMapping compliance, so I’m closing this as a obsoleted.
History
Date User Action Args
2022-04-11 14:57:00adminsetgithub: 52880
2010-11-12 01:14:51eric.araujosetstatus: open -> closed
resolution: duplicate
messages: + msg121003

superseder: Improve dbm modules
stage: resolved
2010-08-05 15:24:47ysj.raysetmessages: + msg112990
2010-08-02 14:59:29eric.araujosetnosy: + eric.araujo
2010-08-02 14:58:28ysj.raysetnosy: + ysj.ray
messages: + msg112484
2010-08-01 23:29:16Kain94setmessages: + msg112403
2010-08-01 23:01:45georg.brandlsetnosy: + georg.brandl
messages: + msg112400
2010-05-06 13:10:43brian.curtinsettitle: [PATCH] get method for dbm interface -> get method for dbm interface
versions: - Python 2.7, Python 3.3
2010-05-06 08:09:26Kain94create