Let me make an example:
class Test:
def __repr__(self):
return "hi"
This changes the string representation of objects of type Test
, but not of Test
itself:
print(Test)
--> "<class 'Test'>"
Is it possible to overwrite the string representation of the class itself too?