Set the value of this option if not :meth:`Option.is_set` Returns the current value (a la :meth:`dict.set_default`)
(self, new: _O)
| 109 | sub_func(new) |
| 110 | |
| 111 | def set_default(self, new: _O) -> _O: |
| 112 | """Set the value of this option if not :meth:`Option.is_set` |
| 113 | |
| 114 | Returns the current value (a la :meth:`dict.set_default`) |
| 115 | """ |
| 116 | if not self.is_set(): |
| 117 | self.set_current(new) |
| 118 | return self._current |
| 119 | |
| 120 | def reload(self) -> None: |
| 121 | """Reload this option from its environment variable""" |