This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author veky
Recipients eric.smith, rhettinger, serhiy.storchaka, veky
Date 2015-03-16.14:03:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1426514626.22.0.324127387956.issue23624@psf.upfronthosting.co.za>
In-reply-to
Content
Ok, let's say I see your point about breaking existing code (though, I reiterate, it's _undocumented_ and even examples in the docs all cover only the obvious case).

Is it _at least_ possible to give .center an (keyword-only if needed) argument that specifies the rounding method? Default will of course be "ROUND_HALF_EVEN", but it should be possible at least to specify "ROUND_FLOOR" to be consistent with format (maybe other rounding method should be supported, but it's not important).

This will not break anything, and it will be a tremendous help to those who want to switch from one method to the other (for example, once the field width becomes variable)? I suggest changing .center instead of format because a) it's easier and more Pythonic (keyword-only arguments are accepted method of dealing exactly with that kind of problem), b) it's more likely wanted to be changed, since format method is more "obvious" to many people, c) I guess more people switch in that direction, and d) format doesn't really have a nice hook in the format string to customize the rounding.

I sincerely hope you'll agree at least to this. Thank you.
History
Date User Action Args
2015-03-16 14:03:46vekysetrecipients: + veky, rhettinger, eric.smith, serhiy.storchaka
2015-03-16 14:03:46vekysetmessageid: <1426514626.22.0.324127387956.issue23624@psf.upfronthosting.co.za>
2015-03-16 14:03:46vekylinkissue23624 messages
2015-03-16 14:03:45vekycreate