title: getting class attributes in particular order
body: <p>I'm trying to find a ways to filter &amp; sort the values of a class's attributes in a list.</p>
  
  <p>Here's what I made:</p>
  
  <pre><code>[foo_class.__dict__[key] for key in foo_class.__dict__.keys() if key in my_bar_list]
  </code></pre>
  
  <p><code>my_bar_list</code> is a list containing some (not all) of the class attributes, in a special order.</p>
  
  <p>Is there a Pythonic way to sort <code>foo_class</code> attributes in <code>my_bar_list</code> order?</p>