def multiline_string_lines(source, include_docstrings=False):
 line_numbers = set()
 previous_token_type = u''
 try:
  for t in generate_tokens(source):
   token_type = t[0]
   start_row = t[2][0]
   end_row = t[3][0]
   if ((token_type == tokenize.STRING) and (start_row != end_row)):
    if (include_docstrings or (previous_token_type != tokenize.INDENT)):
     line_numbers |= set(range((1 + start_row), (1 + end_row)))
   previous_token_type = token_type
 except (SyntaxError, tokenize.TokenError):
  pass
 return line_numbers

def multiline_string_lines ( source , include_docstrings = False ) : line_numbers = set ( ) previous_token_type = u'' try : for t in generate_tokens ( source ) : token_type = t [ 0 ] start_row = t [ 2 ] [ 0 ] end_row = t [ 3 ] [ 0 ] if ( ( token_type == tokenize . STRING ) and ( start_row != end_row ) ) : if ( include_docstrings or ( previous_token_type != tokenize . INDENT ) ) : line_numbers |= set ( range ( ( 1 + start_row ) , ( 1 + end_row ) ) ) previous_token_type = token_type except ( SyntaxError , tokenize . TokenError ) : pass return line_numbers
return line numbers that are within multiline strings .