parameters: (self, sort_criteria, charset, *search_criteria)
return_statement: return self._untagged_response(typ, dat, name)
docstring: IMAP4rev1 extension SORT command.
  
          (typ, [data]) = <instance>.sort(sort_criteria, charset, search_criteria, ...)
docstring_summary: IMAP4rev1 extension SORT command.
docstring_tokens: IMAP4rev1 extension SORT command .
function: def sort(self, sort_criteria, charset, *search_criteria):
          """IMAP4rev1 extension SORT command.
  
          (typ, [data]) = <instance>.sort(sort_criteria, charset, search_criteria, ...)
          """
          name = 'SORT'
          #if not name in self.capabilities:      # Let the server decide!
          #       raise self.error('unimplemented extension command: %s' % name)
          if (sort_criteria[0],sort_criteria[-1]) != ('(',')'):
              sort_criteria = '(%s)' % sort_criteria
          typ, dat = self._simple_command(name, sort_criteria, charset, *search_criteria)
          return self._untagged_response(typ, dat, name)
function_tokens: def sort ( self , sort_criteria , charset , * search_criteria ) : name = 'SORT' #if not name in self.capabilities:      # Let the server decide! #       raise self.error('unimplemented extension command: %s' % name) if ( sort_criteria [ 0 ] , sort_criteria [ - 1 ] ) != ( '(' , ')' ) : sort_criteria = '(%s)' % sort_criteria typ , dat = self . _simple_command ( name , sort_criteria , charset , * search_criteria ) return self . _untagged_response ( typ , dat , name )