def _set_keyword_attributes(self, _data, kwds): # may have passed in keys that are not defined as Properties data = build_data(_data, kwds) for key in data: # Python 3 value = data[key] # # Notice that __setattr__ is overloaded # Must explicitly use Model's setattr because of multiple inheritence Model.__setattr__(self, key, value)
def _set_keyword_attributes(self, _data, kwds): """ Sets Python attributes using the _data and keywords passed in by user. :param _data: Data that was passed in via a dict. :type _data: dict :param kwds: Data that was passed in via name/value pairs. :type kwds: dict :rtype: None """ # NOTE: keys may have been passed in that are not defined as Properties data = build_data(_data, kwds) for key in data: # Python 3 value = data[key] # Notice that __setattr__ is overloaded setattr(self, key, value)