[issue13838] In str.format {0:#.5g} for decimal.Decimal doesn't print trailing zeros

2012-01-23 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: IMO, the behaviour is fine; it's the docs that are unclear. The rules for Decimal are different mainly because trailing zeros have meaning for the Decimal type. (Decimal('1.250') and Decimal('1.25') are two distinct Decimal objects,

[issue13838] In str.format {0:#.5g} for decimal.Decimal doesn't print trailing zeros

2012-01-23 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Ah no, I take it back. I think (2) is fine---this is the usual preservation of trailing zeros where possible. (1) needs to be fixed (and issue #7094 was left open waiting for this fix). -- ___

[issue13838] In str.format {0:#.5g} for decimal.Decimal doesn't print trailing zeros

2012-01-23 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- resolution: - duplicate status: open - closed superseder: - Add alternate float formatting styles to new-style formatting. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13838

[issue13838] In str.format {0:#.5g} for decimal.Decimal doesn't print trailing zeros

2012-01-22 Thread py.user
New submission from py.user port...@yandex.ru: http://docs.python.org/py3k/library/string.html#format-specification-mini-language The '#' option: For floats, complex and Decimal the alternate form causes the result of the conversion to always contain a decimal-point character, even if no

[issue13838] In str.format {0:#.5g} for decimal.Decimal doesn't print trailing zeros

2012-01-22 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: See issue #7098 for a discussion. I propose to close this issue. -- nosy: +eric.smith, mark, skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13838

[issue13838] In str.format {0:#.5g} for decimal.Decimal doesn't print trailing zeros

2012-01-22 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +mark.dickinson -mark ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13838 ___ ___

[issue13838] In str.format {0:#.5g} for decimal.Decimal doesn't print trailing zeros

2012-01-22 Thread py.user
py.user port...@yandex.ru added the comment: my question is about the # option it is described as working with Decimal but it doesn't work with Decimal -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13838