New submission from Nick Coghlan <ncogh...@gmail.com>:

The ">" alignment flag to format() is not right aligning numbers
properly on trunk and the py3k branch:

>>> format(0x1234, "+#08x")
'+0x01234'
>>> format(0x1234, "0=+#8x")
'+0x01234'
>>> format(0x1234, "0>+#8x")
'+0x01234'

That last one should be:
>>> format(0x1234, "0>+#8x")
'0+0x1234'

The intended behaviour of ">" is more obviously correct when you
consider a leading space instead of a leading zero:

>>> format(0x1234, " >+#8x")
' +0x1234'

This is only an error on the development versions - the behaviour is
correct on the 2.6 and 3.1 maintenance branches.

----------
assignee: eric.smith
messages: 93738
nosy: eric.smith, ncoghlan
priority: normal
severity: normal
status: open
title: ">" formatting behaving like "=" formatting
type: behavior
versions: Python 2.7, Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7081>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to