Logo Search packages:      
Sourcecode: cclib version File versions  Download package

def cclib::parser::data::ccData::setattributes (   self,
  attributes 
)
Sets data attributes given in a dictionary.

Inputs:
    attributes - dictionary of attributes to set
Outputs:
    invalid - list of attributes names that were not set, which
      means they are not specified in self._attrlist

Definition at line 175 of file data.py.

00175                                        :
        """Sets data attributes given in a dictionary.
        
        Inputs:
            attributes - dictionary of attributes to set
        Outputs:
            invalid - list of attributes names that were not set, which
                      means they are not specified in self._attrlist
        """
    
        if type(attributes) is not dict:
            raise TypeError, "attributes must be in a dictionary"
    
        valid = [a for a in attributes if a in self._attrlist]
        invalid = [a for a in attributes if a not in self._attrlist]
    
        for attr in valid:
            setattr(self, attr, attributes[attr])
        self.arrayify()
        return invalid

Generated by  Doxygen 1.6.0   Back to index