Message 151279 - Python tracker (original) (raw)
I agree it's not the best error message. What's happening is that these types (list, tuple, etc.) do not implement format, so object.format is used. It returns str(self). Then the resulting string is formatted with the given format_spec. Since str does not support the 'd' format type, the error you see is raised.
I'm open to suggestions on how to improve this, but I don't see how it's possible given what str.format knows when it generates the error.