On 6/5/07, Michel <[EMAIL PROTECTED]> wrote: > > I think I agree with Joel here. str(...) should give something > which is suitable for embedding in text. In case of maxima > objects it doesn't do that. In fact when I first encountered > this behaviour I thought the str(...) function had a bug. It hadn't > occurred to me that the \t's where for 2d display. > > Since there is already a display2d method I don't see why str(...) > could not return the 1D version.
As I remarked above, the definition of __str__ and __repr__ in the Python documentation say that __str__ should return a pretty version and __repr__ and 1-d version. That's just how things are defined in the Python. And, as Tom says, use %r instead of %s. William William --~--~---------~--~----~------------~-------~--~----~ 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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---