title: Using list comprehensions and exceptions?
body: <p>Okay lets say I have a list, and I want to check if that list exists within another list. I can do that doing this:</p>
  
  <pre><code>all(value in some_map for value in required_values)
  </code></pre>
  
  <p>Which works fine, but lets say I want to the raise an exception when a required value is missing, with the value that it is missing. How can I do that using list comprehension? </p>
  
  <p>I'm more or less curious, all signs seem to point to no.</p>
  
  <p><em>EDIT</em> Argh I meant this:</p>
  
  <pre><code>for value in required_values:
   if value not in some_map:
    raise somecustomException(value)
  </code></pre>
  
  <p>Looking at those I cant see how I can find the value where the error occurred</p>