New submission from Anthony Sottile <asott...@umich.edu>:
currently this works correctly: ``` >>> '%8s %8s' % (None, 1) ' None 1' ``` but conversion to f-string fails: ``` >>> f'{None:>8} {1:>8}' Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported format string passed to NoneType.__format__ ``` my proposal is to implement alignment `__format__` for `None` following the same as for `str` for alignment specifiers ---------- components: Interpreter Core messages: 401582 nosy: Anthony Sottile priority: normal severity: normal status: open title: alighment format for nullable values type: behavior versions: Python 3.10, Python 3.11 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45165> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com