Shouldn't %06s zero-pad a string?

Tim Daneliuk tundra at
Fri Feb 14 15:30:07 CET 2003

Jp Calderone wrote:

>   If all you want is a string padded with zeros, use str.zfill().

I'm just curious - what is the rationale' for having this as a string
method?  i.e., This seems more like a special-purpose feature than a
generally-needed string operation.  Is there a PEP describing the genesis
of zfill?

Tim Daneliuk
tundra at

More information about the Python-list mailing list