We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
format()
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Self-explanatory:
>>>>> '{}'.format(1) '1' >>>>> '{}'.format('1') Traceback (most recent call last): File <unknown>, line 0, in <module> TypeError: Unsupported method: __format__ >>>>> '{}'.format({}) Traceback (most recent call last): File <unknown>, line 0, in <module> TypeError: Unsupported method: __format__
As for dicts/sets/etc, AFAIK the default object.__format__ simply fallbacks to str() for types without overridden __format__.
object.__format__
str()
__format__
The text was updated successfully, but these errors were encountered:
93e5634
No branches or pull requests
Self-explanatory:
As for dicts/sets/etc, AFAIK the default
object.__format__
simply fallbacks tostr()
for types without overridden__format__
.The text was updated successfully, but these errors were encountered: