[docs] [issue13790] In str.format an incorrect error message for list, tuple, dict, set

R. David Murray report at bugs.python.org
Sat Jan 21 05:48:37 CET 2012

R. David Murray <rdmurray at bitdance.com> added the comment:

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.)


Python tracker <report at bugs.python.org>

More information about the docs mailing list