There are a number of special methods that permit close integration between our classes and classes builtin Python. The Python standard library calls them basic. A better term might be foundational or essential. These special methods form a foundation for building classes that seamlessly integrate with other Python features.
For example, we often need string representations of a given object's value. The base class, object, has default implementations of __repr__() and __str__() that provide string representations of an object. Sadly, these default representations are remarkably uninformative. We'll almost always want to override one or both of these default definitions. We'll also look at __format__(), which is a bit more sophisticated, but serves a similar purpose.
We'll also look at other conversions, specifically...