Shouldn't the following two both work?

sage: '%.2f' % (pi.n(),)
'3.14'

sage: '{:.2f}'.format(pi.n())
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-6-fb51902794ec> in <module>()
----> 1 '{:.2f}'.format(pi.n())

ValueError: Unknown format code 'f' for object of type 'str'


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to