For a btree database,
btree.get(inexistent_record,DB_SET_RECNO)
should return None instead of DB_SET_RECNO (28)
The faulty code is in function DB_get around
if ((err == DB_NOTFOUND || err == DB_KEYEMPTY) && (dfltobj != NULL)) {
Here *dfltobj has value DB_SET_RECNO
No problem if argument is explicitely defined using flags=
Simple code showing the bug:
vvvvvvvvvvvvvvvvvvvv...