Staging
v0.5.1
https://github.com/python/cpython
Revision 1e18102a72b8982096c3f2b453f7b5da401586f6 authored by Antoine Pitrou on 08 May 2013, 00:07:13 UTC, committed by Antoine Pitrou on 08 May 2013, 00:07:13 UTC
(_testcapi isn't Py_ssize_t-clean, the "s#" code should use an int for length)
1 parent 38f1afe
Raw File
Tip revision: 1e18102a72b8982096c3f2b453f7b5da401586f6 authored by Antoine Pitrou on 08 May 2013, 00:07:13 UTC
Issue #17928: Fix test_structmembers on 64-bit big-endian machines.
Tip revision: 1e18102
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