title: Iterate enum in definition order in Python 2
body: <p>I'm using the backported Enum functionality from python 3.4 with python 2.7:</p>
  
  <pre><code>&gt; python --version
  Python 2.7.6
  &gt; pip install enum34
  # Installs version 1.0...
  </code></pre>
  
  <p>According to the documentation for Enums in python 3 (<a href="https://docs.python.org/3/library/enum.html#creating-an-enum">https://docs.python.org/3/library/enum.html#creating-an-enum</a>), "Enumerations support iteration, <strong>in definition order</strong>".  However, iteration is not happening in order for me:</p>
  
  <pre><code>&gt;&gt;&gt; from enum import Enum
  &gt;&gt;&gt; class Shake(Enum):
  ...     vanilla = 7
  ...     chocolate = 4
  ...     cookies = 9
  ...     mint = 3
  ...     
  &gt;&gt;&gt; for s in Shake:
  ...     print(s)
  ...     
  Shake.mint
  Shake.chocolate
  Shake.vanilla
  Shake.cookies
  </code></pre>
  
  <p>Am I misunderstanding something, or is iteration in definition order just not supported in the backported versions of Enums yet?  Assuming the latter, is there an easy way to force it to happen in order?</p>