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?

5 Answers
5

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *