Set the value of attribute by attribute's name. Args: name(str): the attribute name. val(bool|int|str|float|list): the value of the attribute. Raises: ValueError: If the type of value doesn't match with desc.attr_type(name).
(self, name, val)
| 3834 | return self.desc.attr_type(name, True) |
| 3835 | |
| 3836 | def _set_attr(self, name, val): |
| 3837 | """ |
| 3838 | Set the value of attribute by attribute's name. |
| 3839 | |
| 3840 | Args: |
| 3841 | name(str): the attribute name. |
| 3842 | val(bool|int|str|float|list): the value of the attribute. |
| 3843 | |
| 3844 | Raises: |
| 3845 | ValueError: If the type of value doesn't match with desc.attr_type(name). |
| 3846 | """ |
| 3847 | self._update_desc_attr(name, val) |
| 3848 | |
| 3849 | def _remove_attr(self, name): |
| 3850 | self.desc.remove_attr(name) |
nothing calls this directly
no test coverage detected