Ticket #3485: trac3485-sage_input-review-response.patch

File trac3485-sage_input-review-response.patch, 1.0 kB (added by cwitty, 5 months ago)
  • a/sage/misc/sage_input.py

    old new  
    135135This is the prettiest output we're going to get, but let's make one 
    136136further refinement.  Other \class{_sage_input_} methods, like the one 
    137137for polynomials, analyze the structure of SIEs; they work better (give 
    138 prettier output) if negations are at the outside. 
     138prettier output) if negations are at the outside.  If the above code were 
     139used for rationals, then \code{sage_input(polygen(QQ) - 2/3)} would produce 
     140\code{x + (-2/3)}; if we change to the following code, then we would get 
     141\code{x - 2/3} instead. 
    139142 
    140143sage: def qq_sage_input_v4(self, sib, coerced): 
    141144...       num = self.numerator()