Stefan Krah added the comment: Christian Heimes <rep...@bugs.python.org> wrote: > The output is from Python 3.3. Why has Python 3.3 a less informative error > message than 3.2?
Because the error is discovered in libmpdec and it would require a significant amount of work to provide fine-grained error messages. > I also wonder why it works with floats if it has a special meaning? > Either float or Decimal is broken. Yes, IMO float should detect the ambiguity. You see that the zero implies left padding: >>> "{:06}".format(1.2) '0001.2' And in case of a conflict right padding wins: >>> "{:<06}".format(1.2) '1.2000' The unambiguous way to get right padding is: >>> "{:0<6}".format(Decimal("1.2")) '1.2000' >>> "{:X<6}".format(Decimal("1.2")) '1.2XXX' ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17247> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com