title: Enum in Python doesn't work as expected
body: <p>I found a very strange behavior in the Enum class in Python. So the enumerated type is simple:</p>
  
  <pre><code>from enum import Enum
  Analysis = Enum('Analysis', 'static dynamic')
  </code></pre>
  
  <p>So I use this enumerated type in for step objects so that they store it in the attribute analysis, as follows:</p>
  
  <pre><code>class Step:
      def __init__(self):
          self.analysis = None
          self.bcs = []
  </code></pre>
  
  <p>Very simple so far, so when I have a few of these steps in a list, then I try to see the enumerated type and it has been assigned correctly. But they are not equal:</p>
  
  <pre><code># loop over steps
  for s, step in enumerate(kwargs['steps']):
      print(kwargs)
      print(step)
      print(step.analysis)
      print("test for equality: ",(step.analysis == Analysis.static))
      quit()
  </code></pre>
  
  <p>which prints</p>
  
  <pre class="lang-none prettyprint-override"><code>{'mesh': &lt;fem.mesh.mesh.Mesh object at 0x10614d438&gt;,
   'steps': [&lt;hybrida.fem.step.Step object at 0x10614d278&gt;,
             &lt;hybrida.fem.step.Step object at 0x10616a710&gt;,
             &lt;hybrida.fem.step.Step object at 0x10616a390&gt;]}
  Step:
    analysis: Analysis.static
    bcs: [&lt;hybrida.fem.conditions.dirichlet.Dirichlet object at 0x10616a0f0&gt;,
          &lt;hybrida.fem.conditions.dirichlet.Dirichlet object at 0x10616a320&gt;,
          &lt;hybrida.fem.conditions.dirichlet.Dirichlet object at 0x10616a3c8&gt;,
          &lt;hybrida.fem.conditions.dirichlet.Dirichlet object at 0x10616a470&gt;,
          &lt;hybrida.fem.conditions.dirichlet.Dirichlet object at 0x10616a518&gt;,
          &lt;hybrida.fem.conditions.dirichlet.Dirichlet object at 0x10616a5c0&gt;,
          &lt;hybrida.fem.conditions.dirichlet.Dirichlet object at 0x10616a668&gt;]
  Analysis.static
  test for equality:  False
  </code></pre>
  
  <p>This is not correct, but I have no ideas on how to debug this.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Following the suggestion by @martineau, I created an <code>IntEnum</code> instead and that solved my problem. Yet, I don't understand why the normal <code>Enum</code> doesn't work.</p>