(self, expr, order=None)
A compatibility function for ordering terms in Add.
A compatibility function for ordering terms in Add.
A compatibility function for ordering terms in Add .
def _as_ordered_terms(self, expr, order=None):
        """A compatibility function for ordering terms in Add. """
        order = order or self.order

        if order == 'old':
            return sorted(Add.make_args(expr), key=cmp_to_key(Basic._compare_pretty))
        else:
            return expr.as_ordered_terms(order=order)
def _as_ordered_terms ( self , expr , order = None ) : order = order or self . order if order == 'old' : return sorted ( Add . make_args ( expr ) , key = cmp_to_key ( Basic . _compare_pretty ) ) else : return expr . as_ordered_terms ( order = order )