Rename set_scalar to set_attribute, since it can be used for lists, too