code: def getItemLocals(item):
      '''
      Iterate the locals of an item and yield (name,valu) pairs.
  
      Example:
  
          for name,valu in getItemLocals(item):
              dostuff()
  
      '''
      for name in dir(item):
          try:
              valu = getattr(item, name, None)
              yield name, valu
          except Exception:
              pasf getItemLocals(item):
      '''
      Iterate the locals of an item and yield (name,valu) pairs.
  
      Example:
  
          for name,valu in getItemLocals(item):
              dostuff()
  
      '''
      for name in dir(item):
          try:
              valu = getattr(item, name, None)
              yield name, valu
          except Exception:
              pass
docs: Iterate the locals of an item and yield (name,valu) pairs.
  
      Example:
  
          for name,valu in getItemLocals(item):
              dostuff()