MCPcopy Index your code
hub / github.com/python/cpython / ensure_value

Method ensure_value

Lib/optparse.py:872–875  ·  view source on GitHub ↗
(self, attr, value)

Source from the content-addressed store, hash-verified

870 self._update(vars, mode)
871
872 def ensure_value(self, attr, value):
873 if not hasattr(self, attr) or getattr(self, attr) is None:
874 setattr(self, attr, value)
875 return getattr(self, attr)
876
877
878class OptionContainer:

Callers 3

take_actionMethod · 0.80
take_actionMethod · 0.80
process_nMethod · 0.80

Calls

no outgoing calls

Tested by 2

take_actionMethod · 0.64
process_nMethod · 0.64