title: Format: KeyError when using curly brackets in strings
body: <p>I'm running the following code:</p>
  
  <pre><code>asset = {}
  asset['abc'] = 'def'
  print type(asset)
  print asset['abc']
  query = '{"abc": "{abc}"}'.format(abc=asset['abc'])
  print query
  </code></pre>
  
  <p>Which throws a <code>KeyError</code> error:</p>
  
  <pre><code>[user@localhost] : ~/Documents/vision/inputs/perma_sniff $ python ~/test.py 
  &lt;type 'dict'&gt;
  def
  Traceback (most recent call last):
    File "/home/user/test.py", line 5, in &lt;module&gt;
      query = '\{"abc": "{abc}"\}'.format(abc=asset['abc'])
  KeyError: '"abc"'
  </code></pre>
  
  <p>Format is obviously getting confused by the wrapping <code>{</code>. How can I make sure format only tries to replace the (correct) inner <code>{abc}</code>.</p>
  
  <p>ie, expected output is:</p>
  
  <pre><code>{"abc": "def"}
  </code></pre>
  
  <p>(I'm aware I could use the <code>json</code> module for this task, but I want to avoid that. I would much rather use format.)</p>