Message 151720 - Python tracker (original) (raw)

Oh, I see. Yes, that is a problem.

object.format knows the type of the object it was called on, right? Couldn't it catch the error and re-raise it with the correct type? (If the type isn't str, of course, we don't want to get into an infinite recursion.)