Staging
v0.8.1
https://github.com/python/cpython
Revision b1affc517f67037fcd9027cf92fda3424b80c1ea authored by Mark Dickinson on 04 April 2010, 22:09:21 UTC, committed by Mark Dickinson on 04 April 2010, 22:09:21 UTC
Also add an example of constructing a Decimal directly from a float,
update the quickstart tutorial, and tweak another couple of
sentences.
1 parent bb006cf
Raw File
Tip revision: b1affc517f67037fcd9027cf92fda3424b80c1ea authored by Mark Dickinson on 04 April 2010, 22:09:21 UTC
Add versionchanged entry for Decimal(float) construction.
Tip revision: b1affc5
dbhash.py
"""Provide a (g)dbm-compatible interface to bsddb.hashopen."""

import sys
import warnings
warnings.warnpy3k("in 3.x, the dbhash module has been removed", stacklevel=2)
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