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

Tim Daneliuk tundra at tundraware.com
Fri Feb 14 09:30:07 EST 2003


Jp Calderone wrote:
<SNIP>

>   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 tundraware.com





More information about the Python-list mailing list