[issue6857] float().__format__() default alignment
Eric Smith e...@trueblade.com added the comment: With the fixes for complex in issue 7988, I believe this issue is completed. -- priority: - normal resolution: - accepted stage: - committed/rejected status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6857] float().__format__() default alignment
Mark Dickinson dicki...@gmail.com added the comment: I've changed the default alignment for Decimal instances to right-aligned (so that it agrees with floats and ints) in r74723 (trunk), r74725 (py3k), as agreed in the python-dev thread starting at: http://mail.python.org/pipermail/python-dev/2009-September/091640.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6857] float().__format__() default alignment
Eric Smith e...@trueblade.com added the comment: Thanks for the decimal work, Mark. I notice that complex is also left aligned, by default. I'll take a look at that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6857] float().__format__() default alignment
New submission from Stefan Krah stefan-use...@bytereef.org: format(float(0.12345), 7.0) - '0.1' The default alignment should be 'left-aligned'. -- messages: 92370 nosy: skrah severity: normal status: open title: float().__format__() default alignment versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6857] float().__format__() default alignment
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6857] float().__format__() default alignment
Mark Dickinson dicki...@gmail.com added the comment: Hmm. PEP 3101 does indeed say that left-aligned is the default, but it's a bit of a strange default for numeric types. I'd expect integers (at least) to be right-aligned by default. I'd be inclined to say that the current float formatting is correct, and that it's the Decimal formatting that's wrong. -- nosy: +marketdickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6857] float().__format__() default alignment
Eric Smith e...@trueblade.com added the comment: That is interesting. I'd agree that it's a bug in the PEP. Note that %-formatting right aligns floats by default: '%7.0g' % 0.12345 '0.1' I'll raise the issue on python-dev. Eric. -- assignee: - eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com