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

thomas at xs4all.net.bbs thomas at xs4all.net.bbs
Sun Jul 16 10:50:03 EDT 2000


On Sun, Jul 16, 2000 at 04:38:05PM +0200, Beat Bolli wrote:

> this is my first crack at Python patching. I was simply appalled to find
> '3'.zfill(5) not working anymore in 2.0b1, so I decided to do something
> about it. Now since zfill can be expressed as rjust with an optional pad
> characer argument, I implemented this.

Excellent ! But as you might know, Python has moved to SourceForge, which
includes a Patch Manager. It would definately be best to post your patch
there, including some comments on why it is necessary. If you can't post it
there for some reason, send it to python-dev at python.org.

Oh, and read http://www.python.org/patches/', it contains some hints about
submitting a patch and coding style and such.

As for the patch itself, it looks okay, though I'd say the restriction on
padchar being a single character is a bit strange. Why not allow multiple
characters as padding ? string.join() allows strings instead of single
characters, too.

--
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!



More information about the Python-list mailing list