title: Python: Catching specific exception
body: <p>I want to catch a specific <code>ValueError</code>, not just any <code>ValueError</code>.<br />
  I tried something like this:</p>
  <pre><code>try: maquina['WPF'] = macdat(ibus, id, 'WPF')
  except: ValueError, 'For STRING = ’WPF’, this machine is not a wind machine.':
      pass
  </code></pre>
  <p>But it raises a <code>SyntaxError: can't assign to literal.</code><br />
  Then I tried:</p>
  <pre><code>try: maquina['WPF'] = macdat(ibus, id, 'WPF')
  except ValueError, e:
      if e != 'For STRING = ’WPF’, this machine is not a wind machine.':
          raise ValueError, e
  </code></pre>
  <p>But it raises the exception, even if it is the one I want to avoid.</p>