title: Sort defaultdict by key?
body: <p>I am grouping a list of objects together by their timestamp:</p>
  
  <pre><code>object_list = [
  {
      timestamp: datetime.strptime("01/01/2014", "%d/%m/%y"),
  },
  {
      timestamp: datetime.strptime("12/05/2014", "%d/%m/%y"),
  },
  {
      timestamp: datetime.strptime("03/01/2014", "%d/%m/%y"),
  },
  {
      timestamp: datetime.strptime("01/01/2014", "%d/%m/%y"),
  }]
  
  date_grouped_objects = defaultdict(list)
  
  for obj in object_list:
      date_grouped_objects[obj.timestamp].append(obj)
  </code></pre>
  
  <p>Which gives me exactly what I want, a list of objects grouped together by their timestamp attribute.</p>
  
  <p><strong>Question: I now want to sort date_grouped_objects by the keys (the timestamps), but it isn't clear how you can use sorted to achieve this? So the most group with the most recent date would be last</strong></p>
  
  <p>So what I'm after is:</p>
  
  <pre><code>[
      ["01/01/2014"] = [...],
      ["03/01/2014"] = [...],
      ["12/05/2014"] = [...],
  ]
  </code></pre>
  
  <p>Where the keys are actually date objects, not strings.</p>