Shouldn't %06s zero-pad a string?
lac at strakt.com
Fri Feb 14 07:38:06 CET 2003
In a message of Thu, 13 Feb 2003 19:51:34 +0100, Beat Bolli writes:
>During my latest Python writing I discovered that the expression
>'%06s' % 'a' doesn't return '00000a', but ' a'.
>The documentation never mentions that the zero-padding only applies to
>numbers. Bug or feature?
I'd vote 'documentation bug'. So yes, please report it, so the
documentation can be changed. Documentation bug reports with a
suggested new wording especially welcome.
More information about the Python-list