def _priority_key(pep8_result):
 priority = [u'e701', u'e702', u'e225', u'e231', u'e201', u'e262']
 middle_index = 10000
 lowest_priority = [u'e501']
 key = pep8_result[u'id'].lower()
 try:
  return priority.index(key)
 except ValueError:
  try:
   return ((middle_index + lowest_priority.index(key)) + 1)
  except ValueError:
   return middle_index

def _priority_key ( pep8_result ) : priority = [ u'e701' , u'e702' , u'e225' , u'e231' , u'e201' , u'e262' ] middle_index = 10000 lowest_priority = [ u'e501' ] key = pep8_result [ u'id' ] . lower ( ) try : return priority . index ( key ) except ValueError : try : return ( ( middle_index + lowest_priority . index ( key ) ) + 1 ) except ValueError : return middle_index
key for sorting pep8 results .