On Thu, 18 Jan 2007 10:25:54 -0800, Justin C. Walker <[EMAIL PROTECTED]> wrote:
Hi, all, This strikes me as a bit weird: sage: T=(1,2) sage: print "Test: %s"%T ------------------------------------------------------------------------ --- <type 'exceptions.TypeError'> Traceback (most recent call last) /SandBox/Justin/sb/sage-1.6.alpha2/<ipython console> in <module>() <type 'exceptions.TypeError'>: not all arguments converted during string formatting Is it not possible to directly print a tuple ('...%(T)' doesn't work either)? This seems to be a python problem, not related to the layers between sage and python.
You're right -- this is entirely a Python question. You can print the tuple this way: sage: T=(1,2) sage: print "Test: %s"%(T,) Test: (1, 2) The "(T,)" makes a tuple whose first entry is T. More explicitly, one could do this: sage: T=(1,2) sage: print "Test: %s"%tuple([T]) Test: (1, 2) --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@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-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---