Staging
v0.5.1
https://github.com/python/cpython
Revision 59bd6da8bc8452e3ef58dedc4ff57bd6cf962428 authored by Fred Drake on 05 December 2003, 18:55:46 UTC, committed by Fred Drake on 05 December 2003, 18:55:46 UTC
- note the behavior of bool() with no arg in the main body of the
  description
1 parent 77a7a5a
Raw File
Tip revision: 59bd6da8bc8452e3ef58dedc4ff57bd6cf962428 authored by Fred Drake on 05 December 2003, 18:55:46 UTC
- fix markup in the bool() description
Tip revision: 59bd6da
dbhash.py
"""Provide a (g)dbm-compatible interface to bsddb.hashopen."""

import sys
try:
    import bsddb
except ImportError:
    # prevent a second import of this module from spuriously succeeding
    del sys.modules[__name__]
    raise

__all__ = ["error","open"]

error = bsddb.error                     # Exported for anydbm

def open(file, flag = 'r', mode=0666):
    return bsddb.hashopen(file, flag, mode)
back to top