[issue36912] Can't left-align strings using f-strings or format()

2019-05-13 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: > I thought I was missing something. Some sleep, probably. -- ___ Python tracker ___ ___ Py

[issue36912] Can't left-align strings using f-strings or format()

2019-05-13 Thread Guido van Rossum
Guido van Rossum added the comment: Aha! I thought I was missing something. :-) -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue36912] Can't left-align strings using f-strings or format()

2019-05-13 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Aren't > and < the characters to right/left-align ? >>> foo = 'abc' >>> f"{foo:>10}" ' abc' >>> format(foo, '>10') ' abc' -- nosy: +mbussonn ___ Python tracker

[issue36912] Can't left-align strings using f-strings or format()

2019-05-13 Thread Eric N. Vander Weele
Change by Eric N. Vander Weele : -- nosy: +ericvw ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue36912] Can't left-align strings using f-strings or format()

2019-05-13 Thread Guido van Rossum
New submission from Guido van Rossum : I sometimes like to use format specs like "%-10s" % foo, which left-aligns the string foo in a field of 10 spaces: >>> '%10s' % foo ' abc' >>> foo = 'abc' >>> '%-10s' % foo 'abc ' This is documented in "Format Specification Mini-Language": ht