'Lookup by "someapp" or "someapp.someperm" in perms.'

def __contains__(self, perm_name):

    if ('.' not in perm_name):
        return bool(self[perm_name])
    (app_label, perm_name) = perm_name.split('.', 1)
    return self[app_label][perm_name]
