This is my class (as simple as it can be):
class MyClass(): def __init__(self, id): self.id = id def __str__(self): return \"MyClass
def __repr__(self): return 'MyClass #%d' % (self.id,)