def addToHeadings(headingLineTable, headings, line):
 for depth in xrange(4, (-1), (-1)):
  equalSymbolLength = (depth + 2)
  if (line[:equalSymbolLength] == ('=' * equalSymbolLength)):
   headings.append(Heading(depth).getFromLine(headingLineTable, line))
   return

def addToHeadings ( headingLineTable , headings , line ) : for depth in xrange ( 4 , ( - 1 ) , ( - 1 ) ) : equalSymbolLength = ( depth + 2 ) if ( line [ : equalSymbolLength ] == ( '=' * equalSymbolLength ) ) : headings . append ( Heading ( depth ) . getFromLine ( headingLineTable , line ) ) return
add the line to the headings .