Removed spurious parenthesis.
Removed redundancy in format matching pattern.
Exception raised when the format string is incorrect (same class as for '{<garbage>}".format(3.14)).
Simpler (less "broken") code layout.