attributes = re.findall(attributes_regex, attributes_str)
attributes_dict = {}
if attributes:
- attributes_dict = {attribute_name: attribute_value for (attribute_name, attribute_value) in attributes}
+ for (attribute_name, attribute_value) in attributes:
+ attributes_dict[attribute_name] = attribute_value
return attributes_dict