Hello:
I have next Python 2.5.1 instructions:

>>> a=12.34
>>> b=11.23
>>> print a+b
23.57

>>> print "%15.2f" % (a+b)
          23.57

But:
>>> print "%15.2f" % a+b
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: cannot concatenate 'str' and 'float' objects

Is this correct for Python to issue this error?

Thanks

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to