title: Defining a list of error messages and error codes
body: <p>I want to create a list (not implying Python <code>List</code>) of error messages and corresponding error codes. I have two requirements - <em>be able to look up the error message given an error code</em> and <em>be able to perform the opposite look-up</em>. </p>
  
  <ol>
  <li>Is there a native python data type that can achieve this? If not, how should I implement this? </li>
  <li>This list of error messages + codes would be used by BusinessRuleViolation, a custom exception class. I want this list to associate with BusinessRuleViolation and shouldn't be modified during runtime. How can I do that?</li>
  </ol>