Recently python 2.6.6-r1 ebuild has updated and -berkdb set by default, but files in python package such as /usr/lib64/python2.6/dbhash.py contain line "import bsddb", which fails, because python module from bsddb3 package now has bsddb3 name. Or such issue only if rebuilding python with -berkdb and installing bssdb3?
dbhash module is also deprecated and has been removed in Python 3. You should directly use bsddb3.hashopen().