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

Beat Bolli b11 at gmx.no-spam.net
Fri Feb 14 04:01:48 EST 2003


Hans Nowak wrote:
> Beat Bolli wrote:
> 
>> Jeff Epler wrote:
>>
>>> so "the behavior is undefined" when the s conversion is used.
>>> The treatment of 0 as " " (space) seems fairly useful, though.
>>>
>> That's all fine, but the *Python* manual mentions no such limitation. 
>> Wouldn't be simpler to handle all cases consistently?
> 
> 
> Padding a string with zeroes doesn't make a lot of sense.  Padding it 
Well, it would make sense in my case.

> with spaces seems more useful.  Practicality beats purity, and all that.
> 
>> Still-wondering-whether-to-file-a-bug-ly yours
> 
> 
> I suppose you could file a documentation bug... a request to mention 
> this behavior in the documentation.
> 
> Cheers,
> 

Beat Bolli





More information about the Python-list mailing list