PlasmaCalcs.tools.oop_tools.manage_attrs.set_or_del_attr
- PlasmaCalcs.tools.oop_tools.manage_attrs.set_or_del_attr(obj, attr, value, unset=ATTR_UNSET, *, unset_fail_ok=True)
- usually, setattr(obj, attr, value). However, if
valueisunset, delattr(obj, attr) instead.(valuewill be compared tounsetusing “is”, not “==”.)- unset_fail_ok: bool
- whether to ignore AttributeError when
valueisunsetbut obj.attr is not defined.