def prepare_commentdoc(s):
 result = []
 lines = [line.strip() for line in s.expandtabs().splitlines()]
 for line in lines:
  if line.startswith('#:'):
   line = line[2:]
   if (line and (line[0] == ' ')):
    line = line[1:]
   result.append(line)
 if (result and result[(-1)]):
  result.append('')
 return result

def prepare_commentdoc ( s ) : result = [ ] lines = [ line . strip ( ) for line in s . expandtabs ( ) . splitlines ( ) ] for line in lines : if line . startswith ( '#:' ) : line = line [ 2 : ] if ( line and ( line [ 0 ] == ' ' ) ) : line = line [ 1 : ] result . append ( line ) if ( result and result [ ( - 1 ) ] ) : result . append ( '' ) return result
extract documentation comment lines and return them as a list of lines .