title: python setdefault(key,set())).update(... returns None
body: <p>I'm having a problem with setdefault and unions not working like I expect them to.  My code looks like:</p>
  
  <pre><code>
  
      #!/usr/bin/python3.3
      kanjidic = {
          '恕': {'radical':{'multi_radical': {'口心女'}}},
          '靛': {'radical':{'multi_radical': {'亠宀月疋二青土'}}},
      }
      k_rad = {}
      for k,v in kanjidic.items():
          if 'radical' in v and 'multi_radical' in v['radical']:
              print (k, set(v['radical']['multi_radical']))
              k_rad[k] = k_rad.setdefault(k, set()).update(
                  set(v['radical']['multi_radical']))
          print('>>', k_rad[k])
  
  </code></pre>
  
  <p>The print output looks like:</p>
  
  <pre>
  
      恕 {'口心女'}
      >> None
      靛 {'亠宀月疋二青土'}
      >> None
  
  </pre>
  
  <p>If I substitute the two lines below for setting k_rad:</p>
  
  <pre><code>
  
      k_rad[k] = k_rad.setdefault(k, set())
      k_rad[k].update(set(v['radical']['multi_radical']))
  
  </code></pre>
  
  <p>My output looks like this:</p>
  
  <pre>
  
      靛 {'亠宀月疋二青土'}
      >> {'亠宀月疋二青土'}
      恕 {'口心女'}
      >> {'口心女'}
  
  </pre>
  
  <p>If I understand setdefault, (which obviously I don't) the output should be the same,right?
  What am I missing?  Why am is <code>dict.setupdate(key,set()).update(set(...))</code> returning None?</p>
  
  <p><br>
  As pointed out below, the problem is that update returns None.  I really didn't understand 
  how update and setdefault work together.  Since setdefault sets the dict to the default if
  we're creating a new dict element and returning the the hash and update updates the element
  I didn't need the assignment.  All I really needed was:</p>
  
  <pre><code>
  
      for k,v in kanjidic.items():
          if 'radical' in v and 'multi_radical' in v['radical']:
              k_rad.setdefault(k, set()).update(v['radical']['multi_radical'])
  
  </code></pre>
  
  <p>Thanks for the assistance!</p>