def to_int(*names, **kwargs):

    return reduce(lambda prev, next: (prev | SCOPE_NAME_DICT.get(next, 0)),
            names, kwargs.pop('default', 0))
Turns a list of scope names into an integer value.
dataset/ETHPy150Open caffeinehit/django-oauth2-provider/provider/scope.py/to_int