pwtools.base.FlexibleGetters.try_set_attr

FlexibleGetters.try_set_attr(attr)[source]

If self.<attr> does not exist or is None, then invoke an appropirately named getter as if this command would be executed:

self.foo = self.get_foo()
self._foo = self._get_foo()
Parameters:

attr (string)