title: returned dictionary value is 'None' python
body: <p>I have a function in a file which I am calling in a separate script (as shown below). Printing directly from the function works correctly, however when I try to return the value to the script it sends 'None'.</p>
  
  <p>Any help would be appreciated.
  Thanks</p>
  
  <p>script:</p>
  
  <pre><code>import modules.functions as f
  
  restype = 'THR'
  atomtype = 'CA'
  
  print f.AtomType(restype,atomtype)
  </code></pre>
  
  <p>function: (this is the part of the function which returns the value)</p>
  
  <pre><code>def AtomType(resName,atomType):
      def threonine():
          print 'well im here'
          atoms = {'N' : 1,
                   'CA': 6,
                   'C' : 8,
                   'O' : 2,
                   'CB': 6,
                   'OG1': 1,
                   'CG2': 4, 
                   }    
  
              print atoms[atomType]
              return atoms[atomType]
  
      residues = {'ALA' : hydrophobic,
                  'ARG' : arginine,
                  'ASN' : asparagine,
                  'ASP' : aspartate,
                  'CYS' : cysteine,
                  'GLN' : glutamine,
                  'GLU' : glutamate,
                  'GLY' : hydrophobic,
                  'HIS' : histidine,
                  'ILE' : hydrophobic,
                  'LEU' : hydrophobic,
                  'LYS' : lysine,
                  'MET' : methionine,
                  'PHE' : phenylalanine,
                  'PRO' : proline,
                  'SER' : serine,
                  'THR' : threonine,
                  'TRP' : tryptophan,
                  'TYR' : tyrosine,
                  'VAL' : hydrophobic,
                  }
  
      residues[resName]()
  </code></pre>
  
  <p>and the output I get is:</p>
  
  <pre><code>well im here
  6
  None
  </code></pre>
  
  <p>edit: added entire function</p>