Consider this class:
class foo(object):
pass
The default string representation looks something like this:
>>> str(foo)
"<class '__main__.foo'>"
How can I make this display a custom string?
Consider this class:
class foo(object):
pass
The default string representation looks something like this:
>>> str(foo)
"<class '__main__.foo'>"
How can I make this display a custom string?