[issue33385] setdefault() with a single argument doesn't work for dbm.gdbm and dmb.ndbm objects

Raymond Hettinger report at bugs.python.org
Mon Apr 30 02:12:24 EDT 2018


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

Option 2 seems perfectly reasonable here as a way of preventing bugs (working, correct code wouldn't be using the existing default of None).

Option 1 is problematic because of the variance from Mutable Mapping, because breaking symmetry with get(), and because the change in behavior is implicit.

----------
nosy: +rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33385>
_______________________________________


More information about the Python-bugs-list mailing list