def splitdoc(doc):
 lines = split(strip(doc), '\n')
 if (len(lines) == 1):
  return (lines[0], '')
 elif ((len(lines) >= 2) and (not rstrip(lines[1]))):
  return (lines[0], join(lines[2:], '\n'))
 return ('', join(lines, '\n'))

def splitdoc ( doc ) : lines = split ( strip ( doc ) , '\n' ) if ( len ( lines ) == 1 ) : return ( lines [ 0 ] , '' ) elif ( ( len ( lines ) >= 2 ) and ( not rstrip ( lines [ 1 ] ) ) ) : return ( lines [ 0 ] , join ( lines [ 2 : ] , '\n' ) ) return ( '' , join ( lines , '\n' ) )
split a doc string into a synopsis line and the rest .