资讯

In Python, a SyntaxError happens when the interpreter finds code that does not conform to the rules of the Python language.
While I do think returning the formatted string (even if exc_text isn't updated) is more intuitive, I'm unsure about changing the default behavior of Formatter.format() since its a public interface.