[Patch] {l,r}just with optional pad character parameter

Peter Schneider-Kamp peter at schneider-kamp.de
Mon Jul 17 20:27:00 EDT 2000


Moshe Zadka wrote:
> 
> In the face of ambiguity, refuse the temptation to guess!!!!!
> 
> "GvR".ljust(6, "12")
> Traceback (innermost last):
>   File "<stdin>", line 1, in ?
> ValueError: second argument to ljust must be of length 1

So what exactly did you want to express with that?

I knew that it only takes strings of length 1 right now.
My questions were directed to Thomas' question
"Why not allow multiple characters as padding ?".

better-read-the-quoted-text-too-<wink>-ly y'rs
peter
--
Peter Schneider-Kamp          ++47-7388-7331
Herman Krags veg 51-11        mailto:peter at schneider-kamp.de
N-7050 Trondheim              http://schneider-kamp.de




More information about the Python-list mailing list