title: Python format throws KeyError
body: <p>The following code snippet:</p>
  
  <pre><code>template = "\                                                                                
  function routes(app, model){\                                                                
    app.get('/preNew{className}', function(req, res){\                                         
      res.render('{className}'.ejs, {});\                                                      
    });\                                                                                       
  });".format(className=className)
  </code></pre>
  
  <p>throws a KeyError:</p>
  
  <pre><code>Traceback (most recent call last):   File "createController.py", line 31, in &lt;module&gt;
      });".format(className=className) KeyError: '  app'
  </code></pre>
  
  <p>Does someone know why?</p>