Ticket #13360: trac_13359_expression_nonzero_shouldnt_call_variables_unless_necessary_0002.patch

File trac_13359_expression_nonzero_shouldnt_call_variables_unless_necessary_0002.patch, 841 bytes (added by tkluck, 9 years ago)
  • sage/symbolic/expression.pyx

    # HG changeset patch
    # User Timo Kluck <tkluck@infty.nl>
    # Date 1344811682 -7200
    # Node ID 15647e76594af7e040c0be4440ee7a7a8a79dc75
    # Parent  a1c853a480034b655f359b4cb1677c23c636d4fa
    minor improvement in the performance spirit
    
    diff --git a/sage/symbolic/expression.pyx b/sage/symbolic/expression.pyx
    a b  
    20412041            need_assumptions = False
    20422042            from sage.symbolic.assumptions import assumptions
    20432043            assumption_list = assumptions()
    2044             if len(assumption_list) > 0:
     2044            if assumption_list:
    20452045                vars = self.variables()
    2046                 if len(vars) > 0:
     2046                if vars:
    20472047                    assumption_var_list = []
    20482048                    for eqn in assumption_list:
    20492049                        try: