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 eric.smith
Recipients eric.smith, r.david.murray, rhettinger, serhiy.storchaka, veky
Date 2015-03-18.13:54:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1426686892.9.0.860804378754.issue23624@psf.upfronthosting.co.za>
In-reply-to
Content
I agree with David: It's unfortunate, but too late to change.

FWIW, since the goal is to replace just str.center, I'd write this as:

def my_center(s, width):
    return format(s, '^' + str(width))

As soon as you're mixing in other formatting, then str.center couldn't have been used, anyway, so no sense bringing all of str.format to bear on the problem.
History
Date User Action Args
2015-03-18 13:54:52eric.smithsetrecipients: + eric.smith, rhettinger, r.david.murray, serhiy.storchaka, veky
2015-03-18 13:54:52eric.smithsetmessageid: <1426686892.9.0.860804378754.issue23624@psf.upfronthosting.co.za>
2015-03-18 13:54:52eric.smithlinkissue23624 messages
2015-03-18 13:54:52eric.smithcreate