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

File trac3485-sage_input-review-response.patch, 1023 bytes (added by Carl Witty, 14 years ago)
  • sage/misc/sage_input.py

    # HG changeset patch
    # User Carl Witty <cwitty@newtonlabs.com>
    # Date 1218350702 25200
    # Node ID 46f0744466bb12987c2061cacd8fb1709a001996
    # Parent  e9365baed0c516966be1d5c3d195de9a5ffca383
    Response to reviewer comments
    
    diff -r e9365baed0c5 -r 46f0744466bb sage/misc/sage_input.py
    a b  
    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()