I just encountered this: >>> '{:0s}'.format('hello') Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: '=' alignment not allowed in string format specifier
The exception goes away if I do not specify a width of the string: >>> '{:s}'.format('hello') 'hello' My reading of the documentation says I should be able to specify a width when interpolating a string. I have tried this in 2.7.13, 3.6.1 and 3.6.2 and it fails in all of them. Is this a bug or am I confused? -Ken -- https://mail.python.org/mailman/listinfo/python-list