title: Sorting a dictionary to an OrderedDict with a single key
body: <p>I am trying to write some code which creates a sorted <code>OrderedDict</code>. The code will have an unordered <code>dict</code> passed to it. Unfortunately, it seems that <code>OrderedDict(sorted(x))</code> explodes when the dictionary <code>x</code> only has one key:</p>
  
  <pre><code>&gt;&gt;&gt; from collections import OrderedDict
  &gt;&gt;&gt; a = {"b": 1}
  &gt;&gt;&gt; OrderedDict(a)
  OrderedDict([('b', 1)])
  &gt;&gt;&gt; sorted(a)
  ['b']
  &gt;&gt;&gt; OrderedDict(sorted(a))
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/collections/__init__.py", line 56, in __init__
      self.__update(*args, **kwds)
    File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/_collections_abc.py", line 602, in update
      for key, value in other:
  ValueError: need more than 1 value to unpack
  &gt;&gt;&gt; 
  </code></pre>
  
  <p>Of course, I realise that I can just check the number of keys in the dictionary and behave appropriately. However, I wanted to check if I am doing something wrong here, because it seems like it should work. Is there a better/more appropriate way to do this?</p>