title: how to work with dictionary in maya python
body: <p>i try to learn Dictionary on maya python.</p>
  
  <p>i want to record the rotations from some objects, and i will use it later
  its working to record the value, but its always give me 'none' answer when i call the dictionary</p>
  
  <pre><code>import maya.cmds as cmds
  
  myDic = {}
  
  def test():
      mods = cmds.getModifiers()
      SELlis = cmds.ls(sl = 1)
  
      a = 0
      b = 1
  
      if mods == 4:
          for obj in SELlis:
              myDic[obj] = cmds.getAttr(obj+'.rotate')
  
      else :
          for obj in SELlis:
              if obj in myDic:
                  print myDic.get(obj)
  
              else :
                  print 'none'
     test()
  </code></pre>
  
  <p>Thanks</p>