I want to write my own __repr__ for some class that I define. I want it to be similar to the default <__main__.O object at 0x00D229D0>, except have a few other details in there. How do I reproduce that <__main__.O object at 0x00D229D0> thing?
I want to write my own __repr__ for some class that I define. I
Share
See http://docs.python.org/reference/datamodel.html#object.repr