title: Python: difference between ValueError and Exception?
body: <p>I am trying to understand what is a difference between raising a ValueError and an Exception. I have tried both in the same code (even in the same branch) and the result was the same - I got an error message.</p>
  
  <p>I have made a research on this question on SO, but found no discussion on this. Then I read the documentation of exceptions, and found the following <a href="https://docs.python.org/2/library/exceptions.html" rel="noreferrer">definition</a> of ValueError: </p>
  
  <blockquote>
    <p>Raised when a built-in operation or function receives an argument that has the right type but an inappropriate value, and the situation is not described by a more precise exception such as <code>IndexError</code>.</p>
  </blockquote>
  
  <p>So as I understand, an Exception is a more general term, and ValueError can be applied in some specific cases. But since the results of raising both things are the same, I want to understand, what is the practical meaning of differentiating between a ValueError and an Exception. Python version should be here not relevant. Thank you!</p>
  
  <p><strong>EDIT</strong>:
  Thanks to your answers I got it, what is the difference between both terms in try-exception construct. But how do they differ in case of just raising them, not excepting?</p>
  
  <pre><code>raise Exception('blah') 
  </code></pre>
  
  <p>and </p>
  
  <pre><code>raise ValueError('blah') 
  </code></pre>
  
  <p>Answering to @PeterWood: in both cases I just got the error message "blah", but in one case it was "Exception: blah", and in the second: "ValueError: blah". And I see in this case no practical difference between them both.</p>