Issue #7632: Fix a serious wrong output bug for string -> float conversion.
[python.git] / Lib / dbhash.py
blob77a878e964b8d522af9f75a643e4de99b63fca7d
1 """Provide a (g)dbm-compatible interface to bsddb.hashopen."""
3 import sys
4 if sys.py3kwarning:
5 import warnings
6 warnings.warnpy3k("in 3.x, the dbhash module has been removed", DeprecationWarning, 2)
7 try:
8 import bsddb
9 except ImportError:
10 # prevent a second import of this module from spuriously succeeding
11 del sys.modules[__name__]
12 raise
14 __all__ = ["error","open"]
16 error = bsddb.error # Exported for anydbm
18 def open(file, flag = 'r', mode=0666):
19 return bsddb.hashopen(file, flag, mode)