def set_attrs(obj, attrs):
    o = setattr

    if hasattr(obj, '__setitem__'):
        o = type(obj).__setitem__

    [o(obj, k, v) for k, v in attrs.iteritems()]
Creates database and sets itself as the active database.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/PyAMF-0.6.1/pyamf/util/__init__.py/set_attrs--crossover with--dataset/ETHPy150Open saeschdivara/ArangoPy/arangodb/api.py/Database.create