[issue45165] alighment format for nullable values

2021-09-10 Thread Anthony Sottile
Anthony Sottile added the comment: alignment was the only one I found which was applicable and didn't work `!s` "works" but it's kind of a hack (of course I want string formatting, I'm making a string!) -- then I would want to write `!s` everywhere which is cumbersome and ugly --

[issue45165] alighment format for nullable values

2021-09-10 Thread Eric V. Smith
Change by Eric V. Smith : -- type: behavior -> enhancement versions: -Python 3.10 ___ Python tracker ___ ___ Python-bugs-list

[issue45165] alighment format for nullable values

2021-09-10 Thread Eric V. Smith
Eric V. Smith added the comment: Why would you only want alignment, and not all string formatting options? And if that's the case, just convert it to a string: >>> f'{None!s:>8} {1:>8}' 'None1' -- nosy: +eric.smith ___ Python tracker

[issue45165] alighment format for nullable values

2021-09-10 Thread Anthony Sottile
New submission from Anthony Sottile : currently this works correctly: ``` >>> '%8s %8s' % (None, 1) 'None1' ``` but conversion to f-string fails: ``` >>> f'{None:>8} {1:>8}' Traceback (most recent call last): File "", line 1, in TypeError: unsupported format string passed to