Hi,
I notice that in PEP 3108 the dbm modules are going to be in package dbm:
New Old ----------- -------------------------------------------- dbm.tools anydbm + whichdb dbm.db db.hash (actually bsd db so presumably using bsddb.hashopen() behind the scenes?) dbm.ndbm dbm dbm.dumb dumbdbm dbm.gnu gdbm
This leaves bsddb as a separate package. As far as I can tell bsddb is not so different from the others. I presume (although the documentation for bsddbobject.keys() denies it) that btopen() gives lexicographical ordering and rnopen() give insertion order ordering by keys, whereas hashopen() is unordered like a dict and like the other dbms provided.
In any case the name dbm.db seems wrong to me (too generic when the others are specific to their dbm type), so at the least shouldn't dbm.db be renamed dbm.bsd?
If consistency were wanted, dbm.bsd.open() could be a wrapper for dbm.bsd.hashopen() but only with filenname, flag and mode arguments so as to match the other dbms, and with dbm.bsd.hashopen(), dbm.bsd.btopen() and dbm.bsd.rnopen() and the other bsddb-specific functions available in the module as usual?
On Wed, Mar 26, 2008 at 12:15 AM, Mark Summerfield mark@qtrac.eu wrote:
Hi,
I notice that in PEP 3108 the dbm modules are going to be in package dbm:
New Old ----------- -------------------------------------------- dbm.tools anydbm + whichdb dbm.db db.hash (actually bsd db so presumably using bsddb.hashopen() behind the scenes?) dbm.ndbm dbm dbm.dumb dumbdbm dbm.gnu gdbm
This leaves bsddb as a separate package. As far as I can tell bsddb is not so different from the others. I presume (although the documentation for bsddbobject.keys() denies it) that btopen() gives lexicographical ordering and rnopen() give insertion order ordering by keys, whereas hashopen() is unordered like a dict and like the other dbms provided.
In any case the name dbm.db seems wrong to me (too generic when the others are specific to their dbm type), so at the least shouldn't dbm.db be renamed dbm.bsd?
Good point. Anyone object to that renaming?
If consistency were wanted, dbm.bsd.open() could be a wrapper for dbm.bsd.hashopen() but only with filenname, flag and mode arguments so as to match the other dbms, and with dbm.bsd.hashopen(), dbm.bsd.btopen() and dbm.bsd.rnopen() and the other bsddb-specific functions available in the module as usual?
Adding new functions is beyond the reorganization of the stdlib. But it could be considered as a separate idea.
-Brett
On Wed, Mar 26, 2008 at 8:30 PM, Brett Cannon brett@python.org wrote:
On Wed, Mar 26, 2008 at 12:15 AM, Mark Summerfield mark@qtrac.eu wrote:
Hi,
I notice that in PEP 3108 the dbm modules are going to be in package dbm:
New Old ----------- -------------------------------------------- dbm.tools anydbm + whichdb dbm.db db.hash (actually bsd db so presumably using bsddb.hashopen() behind the scenes?) dbm.ndbm dbm dbm.dumb dumbdbm dbm.gnu gdbm
This leaves bsddb as a separate package. As far as I can tell bsddb is not so different from the others. I presume (although the documentation for bsddbobject.keys() denies it) that btopen() gives lexicographical ordering and rnopen() give insertion order ordering by keys, whereas hashopen() is unordered like a dict and like the other dbms provided.
In any case the name dbm.db seems wrong to me (too generic when the others are specific to their dbm type), so at the least shouldn't
dbm.db
be renamed dbm.bsd?
Good point. Anyone object to that renaming?
+1 for dbm.bsd, it's more informative.
If consistency were wanted, dbm.bsd.open() could be a wrapper for dbm.bsd.hashopen() but only with filenname, flag and mode arguments so as to match the other dbms, and with dbm.bsd.hashopen(), dbm.bsd.btopen() and dbm.bsd.rnopen() and the other bsddb-specific functions available in the module as usual?
Adding new functions is beyond the reorganization of the stdlib. But it could be considered as a separate idea.
-Brett _______________________________________________ stdlib-sig mailing list stdlib-sig@python.org http://mail.python.org/mailman/listinfo/stdlib-sig
On 26/03/2008, at 19:33, Quentin Gallet-Gilles wrote:
On Wed, Mar 26, 2008 at 8:30 PM, Brett Cannon brett@python.org wrote: On Wed, Mar 26, 2008 at 12:15 AM, Mark Summerfield mark@qtrac.eu wrote:
Hi,
I notice that in PEP 3108 the dbm modules are going to be in
package
dbm:
New Old ----------- -------------------------------------------- dbm.tools anydbm + whichdb dbm.db db.hash (actually bsd db so presumably using bsddb.hashopen() behind the scenes?) dbm.ndbm dbm dbm.dumb dumbdbm dbm.gnu gdbm
This leaves bsddb as a separate package. As far as I can tell
bsddb is
not so different from the others. I presume (although the
documentation
for bsddbobject.keys() denies it) that btopen() gives
lexicographical
ordering and rnopen() give insertion order ordering by keys,
whereas
hashopen() is unordered like a dict and like the other dbms
provided.
In any case the name dbm.db seems wrong to me (too generic when the others are specific to their dbm type), so at the least shouldn't
dbm.db
be renamed dbm.bsd?
Good point. Anyone object to that renaming?
+1 for dbm.bsd, it's more informative.
+1
-- Leonardo Santagada
I went ahead and renamed dbm.db to dbm.bsd in the PEP.
-Brett
On Wed, Mar 26, 2008 at 12:15 AM, Mark Summerfield mark@qtrac.eu wrote:
Hi,
I notice that in PEP 3108 the dbm modules are going to be in package dbm:
New Old ----------- -------------------------------------------- dbm.tools anydbm + whichdb dbm.db db.hash (actually bsd db so presumably using bsddb.hashopen() behind the scenes?) dbm.ndbm dbm dbm.dumb dumbdbm dbm.gnu gdbm
This leaves bsddb as a separate package. As far as I can tell bsddb is not so different from the others. I presume (although the documentation for bsddbobject.keys() denies it) that btopen() gives lexicographical ordering and rnopen() give insertion order ordering by keys, whereas hashopen() is unordered like a dict and like the other dbms provided.
In any case the name dbm.db seems wrong to me (too generic when the others are specific to their dbm type), so at the least shouldn't dbm.db be renamed dbm.bsd?
If consistency were wanted, dbm.bsd.open() could be a wrapper for dbm.bsd.hashopen() but only with filenname, flag and mode arguments so as to match the other dbms, and with dbm.bsd.hashopen(), dbm.bsd.btopen() and dbm.bsd.rnopen() and the other bsddb-specific functions available in the module as usual?
-- Mark Summerfield, Qtrac Ltd., www.qtrac.eu
stdlib-sig mailing list stdlib-sig@python.org http://mail.python.org/mailman/listinfo/stdlib-sig