PEP proposal: enhanced string functions
Mikael Olofsson
mikael at isy.liu.se
Wed Nov 14 08:46:05 EST 2001
On 14-Nov-2001 Matthew Dixon Cowles wrote:
> I'd prefer to be able to pass a sequence to strip() and have
> any of those characters stripped.
On 14-Nov-2001 Oliver Fromme wrote:
> For the center() case, it might be useful to optionally
> allow another argument, so you can have different padding
> on the left and on the right.
>
> Example:
> >>> string.center(" Title ", 25, ">", "<")
> '>>>>>>>>> Title <<<<<<<<<'
To conform with Matthew's proposal about strip(), you might want to use
the same argument for left and right padding in center(), as in
>>> string.center(" Title ", 25, "><")
'>>>>>>>>> Title <<<<<<<<<'
/Mikael
-----------------------------------------------------------------------
E-Mail: Mikael Olofsson <mikael at isy.liu.se>
WWW: http://www.dtr.isy.liu.se/dtr/staff/mikael
Phone: +46 - (0)13 - 28 1343
Telefax: +46 - (0)13 - 28 1339
Date: 14-Nov-2001
Time: 14:41:35
/"\
\ / ASCII Ribbon Campaign
X Against HTML Mail
/ \
This message was sent by XF-Mail.
-----------------------------------------------------------------------
Linköpings kammarkör: www.kammarkoren.com
More information about the Python-list
mailing list