On Sat, Sep 6, 2008 at 9:31 PM, Bill Page wrote: >> >> #4028: Mike Hansen: doctest and improve sage/interfaces/axiom.py >> [Reviewed by Michael Abshoff] > > I have looked carefully at the changes to 'axiom.py' by Mike Hansen > and I think there is a serious problem: The change relating to > displaying Axiom output in 2-d form breaks an important design > principle in python which all other external packages (and Sage > itself) currently satisfy: "The repr function makes an attempt to > return a string that would yield an object with the same value when > passed to eval()." > > sage: p=maxima('1/2') > sage: p==maxima(repr(p)) > True > ...
After sending this email I reviewed some of the previous messages about the use of repr in Sage. One way of summarizing this is that Sage does not actually follow the usual Python convention here (in spite of my examples :-). But I just wanted to add here that the same issue applies if one substitutes 'str' for 'repr': sage: p=axiom('1/2') sage: str(p) ' 1\r\n -\r\n 2' Regards, Bill Page. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---