On Monday, June 9, 2014 5:35:34 AM UTC+4, Amit Saha wrote: > > I came across this: > > >>> from sympy import Float > >>> Float(1.25343) > 1.25343000000000 > > >>> '{0:.2f}'.format(Float(1.25343)) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > ValueError: Unknown format code 'f' for object of type 'str' > > Is this known/expected? Shouldn't it work? >
Why? "f" stands for builtin float, not Float. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/9e8b5557-0576-4f15-857d-5ff2b0ac00ee%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.