def nextCategory(string):
 if string.startswith(u'('):
  return matchBrackets(string)
 return NEXTPRIM_RE.match(string).groups()

def nextCategory ( string ) : if string . startswith ( u'(' ) : return matchBrackets ( string ) return NEXTPRIM_RE . match ( string ) . groups ( )
separate the string for the next portion of the category from the rest of the string .