In Python, the object class serves as the root superclass for all the (new-style) classes. By default at least, applying str and repr
object
str
repr
You can also set the default metaclass for a whole module like this
class fancytype(type): def __str__(self): return self.__name__ __metaclass__ = fancytype class ham: pass print ham