Staging
v0.5.1
https://github.com/python/cpython
Revision f10006cdb82a27802ec7c9340e59030712d36f29 authored by Serhiy Storchaka on 24 October 2016, 20:47:08 UTC, committed by Serhiy Storchaka on 24 October 2016, 20:47:08 UTC
1 parent 59addd6
Raw File
Tip revision: f10006cdb82a27802ec7c9340e59030712d36f29 authored by Serhiy Storchaka on 24 October 2016, 20:47:08 UTC
Issue #25464: Fixed HList.header_exists() in Tix module by adding
Tip revision: f10006c
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