parameters: (self, args)
return_statement: return permissions
docstring: Decodes and sanity-checks the permissions in the arguments.
docstring_summary: Decodes and sanity-checks the permissions in the arguments.
docstring_tokens: Decodes and sanity - checks the permissions in the arguments .
function: def _parse_permissions(self, args):
      """Decodes and sanity-checks the permissions in the arguments."""
      # A dictionary mapping from user ids to one of 'R', 'W', or 'D'.
      permissions = {}
      if args.u:
        for user in args.u:
          self._set_permission(permissions, user, self._user_account_type(user))
      if args.d:
        for user in args.d:
          self._remove_permission(
              permissions, user, self._user_account_type(user))
      if args.g:
        for group in args.g:
          self._set_permission(permissions, group, 'group:')
      if args.dg:
        for group in args.dg:
          self._remove_permission(permissions, group, 'group:')
      return permissions
function_tokens: def _parse_permissions ( self , args ) : # A dictionary mapping from user ids to one of 'R', 'W', or 'D'. permissions = { } if args . u : for user in args . u : self . _set_permission ( permissions , user , self . _user_account_type ( user ) ) if args . d : for user in args . d : self . _remove_permission ( permissions , user , self . _user_account_type ( user ) ) if args . g : for group in args . g : self . _set_permission ( permissions , group , 'group:' ) if args . dg : for group in args . dg : self . _remove_permission ( permissions , group , 'group:' ) return permissions