@serhiy Moving my speculative discussion to python-ideas. CC as
courtesy, comment from you is welcome but not necessarily expected.
Serhiy Storchaka writes:
> format() without format specifier and str() should return the same
> value in general, otherwise it will confuse users.
I think this is a good rule of thumb because it's a very plausible
default for format(), and easy to explain.
But then what is the purpose of format()? Why not just give str() the
functionality of format(), and deprecate format() for future use? Or
vice versa, format() might be the better name, but the backward
compatibility implications given the pervasive use of str() would be
awesome, and not in a good way.
Given how pervasive both str and format are, and the fact that str
also has both .format() and .__format__ methods, I guess I'm asking
for a lot of trouble. But this plethora of approaches to providing a
string presentation of an object seems designed to confuse users, and
it's not clear to me that trying to maintain str(thing) == format(thing)
necessary helps dissolve that confusion.
Steve