Staging: this is not the live site, pydocs.org.
Default object formatter.
Return str(self) if format_spec is empty. Raise TypeError otherwise.
Changed in 3.4, 3.7
- 3.4: The __format__ method of object itself raises a TypeError if passed any non-empty string.
- 3.7: object.__format__(x, '') is now equivalent to str(x) rather than format(str(x), '').