def _FindAttributes (self, t) :
      # Collect all things that could be attributes
      attrs = { }   # RVO
      if "__attrs__" in t :  # We want to discover automatically:
          # Attributes all in special key '__attrs__'
          attrs = t["__attrs__"]
          
      # Attributes may also have to be found
      sorted_keys = sorted(t.keys())
      for key in sorted_keys :
          value = t[key]
      ##for key, value in sorted(t.iteritems()) :
          if key=="__attrs__": continue  # already processed
          if key=="__content__": continue # special

          # Special character says they *MAY* become attributes
          if (len(key)> 0 and key[0] == self.prependChar_) :
              if attrs in key :
                  self._handleProblem(key+string(" already in ")+str(t))
	
              key_without_underscore = key[1:]
              if (self.options_ & XML_DUMP_PREPEND_KEYS_AS_TAGS)==0 :
                  attrs[key_without_underscore] = value
                  continue
	
          # Do All simple values become attributes?
          if (self.options_ & XML_DUMP_SIMPLE_TAGS_AS_ATTRIBUTES) :
              simple = not self._IsComposite(value)
              if key in attrs :
                  self._handleProblem(key+string(" already in ")+str(t))
	
              if simple :
                  attrs[key] = value
              continue
      # All done
      return attrs
dataset/ETHPy150Open redhat-imaging/imagefactory/imgfac/picklingtools/xmldumper.py/XMLDumper._FindAttributes/swapped operands of `in`