Serhiy Storchaka added the comment: But on other hand, the error depends on the value of format specifier:
>>> format('abc', '') 'abc' >>> format('abc', 'j') Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: Unknown format code 'j' for object of type 'str' >>> format([1, 2, 3], '') '[1, 2, 3]' >>> format([1, 2, 3], 'j') Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported format string passed to list.__format__ If keep TypeError I think it would be better to restore former error message "non-empty format string". ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28385> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com