def _paragraphs(text):
 paragraphs = [[]]
 for line in text.splitlines():
  if line.strip():
   paragraphs[(-1)].append(line)
  elif paragraphs[(-1)]:
   paragraphs.append([])
 return [u' '.join(lines).strip() for lines in paragraphs]

def _paragraphs ( text ) : paragraphs = [ [ ] ] for line in text . splitlines ( ) : if line . strip ( ) : paragraphs [ ( - 1 ) ] . append ( line ) elif paragraphs [ ( - 1 ) ] : paragraphs . append ( [ ] ) return [ u' ' . join ( lines ) . strip ( ) for lines in paragraphs ]
splits a piece of text into paragraphs .