Hi Steve (for clarity Turnbull)

You wrote: Allowing objects to decide implicitly how to represent themselves is usually a bad idea, and we shouldn't encourage it.

I'm puzzled. I thought that when I define a class X, I'm generally encouraged to define a __repr__ method, that is used to decide how an instance of X represents itself.  (That is, unless I already get a good __repr__ from inheritance.)

However, you wrote "decide implicitly". Perhaps I'm missing something in the "implicitly".

For clarity, I'm not making a statement about your examples. Just the principle which you claim underlies your examples.

best regards

Jonathan