def get_permission(perms, p):
 for name in permlist():
  perms[name] = has_permission(p, getattr(PERMS, name))

def get_permission ( perms , p ) : for name in permlist ( ) : perms [ name ] = has_permission ( p , getattr ( PERMS , name ) )
returns a dict with permission key .