#NEWLINE# def get_predicates( self , dispatch ) : #NEWLINE# #INDENT# 'Create Reg predicates.\n\n        This creates :class:`reg.Predicate` objects for a particular\n        dispatch function.\n\n        Uses :meth:`PredicateRegistry.sorted_predicate_infos` to sort\n        the predicate infos.\n\n        :param dispatch: the dispatch function to create the predicates for.\n\n        :return: a list of :class:`reg.Predicate` instances in the\n          correct order.\n        ' #NEWLINE# infos = self . sorted_predicate_infos ( dispatch ) #NEWLINE# result = [ ] #NEWLINE# for info in infos : #NEWLINE# #INDENT# fallback = self . _predicate_fallbacks . get ( dispatch , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) . get ( info . func ) #NEWLINE# predicate = Predicate ( info . name , info . index , KeyExtractor ( info . func ) , fallback = fallback , default = info . default ) #NEWLINE# result . append ( predicate ) #NEWLINE# #UNINDENT# return result