def GetOrderedIntersection(handler_list):
 results = _Intersect(handler_list)
 results = sorted(results, key=(lambda h: h.pattern))
 _ReorderHandlers(results)
 _GivePropertiesFromGeneralToSpecific(results)
 return _RemoveRedundantHandlers(results)

def GetOrderedIntersection ( handler_list ) : results = _Intersect ( handler_list ) results = sorted ( results , key = ( lambda h : h . pattern ) ) _ReorderHandlers ( results ) _GivePropertiesFromGeneralToSpecific ( results ) return _RemoveRedundantHandlers ( results )
implements algorithm for combining and reordering handlers .