[issue23624] str.center inconsistent with format "^"

R. David Murray report at bugs.python.org
Wed Mar 18 14:21:51 CET 2015


R. David Murray added the comment:

I would write it:

   "{:^{width}}".format(title, width=width)

By the way, in case it isn't clear, we acknowledge that in a perfect world center would work "right", but our judgment is that the pain of fixing it outweighs the benefit.  Our collective consensus on that could be shifted, but someone would have to be willing to argue it convincingly to the community (ie: not on the bug tracker).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23624>
_______________________________________


More information about the Python-bugs-list mailing list