[Patch] {l,r}just with optional pad character parameter
Moshe Zadka
moshez at math.huji.ac.il
Tue Jul 18 00:33:53 EDT 2000
On Tue, 18 Jul 2000, Peter Schneider-Kamp wrote:
> 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 ?".
Oh, sorry. In that case, I think that that was a good answer to Thomas
<wink>
--
Moshe Zadka <moshez at math.huji.ac.il>
There is no GOD but Python, and HTTP is its prophet.
http://advogato.org/person/moshez
More information about the Python-list
mailing list