def _read_overrides(overrides_file):
 if (not overrides_file):
  return {}
 overrides_lines = [line for line in overrides_file.readlines() if (not line.startswith('#'))]
 overrides_pairs = zip(overrides_lines[0::3], overrides_lines[1::3])
 _assert_is_all_blank_lines(overrides_lines[2::3], overrides_file)
 return dict(overrides_pairs)

def _read_overrides ( overrides_file ) : if ( not overrides_file ) : return { } overrides_lines = [ line for line in overrides_file . readlines ( ) if ( not line . startswith ( '#' ) ) ] overrides_pairs = zip ( overrides_lines [ 0 : : 3 ] , overrides_lines [ 1 : : 3 ] ) _assert_is_all_blank_lines ( overrides_lines [ 2 : : 3 ] , overrides_file ) return dict ( overrides_pairs )
read pattern overrides from overrides_file .