def set(self, target, value):
if not self._set:<EOL><INDENT>return<EOL><DEDENT>if self.path is None:<EOL><INDENT>self.set = lambda *a: None<EOL>return None<EOL><DEDENT>if self._segments[target.__class__]:<EOL><INDENT>self.get(target)<EOL><DEDENT>if self._segments[target.__class__]:<EOL><INDENT>return<EOL><DEDENT>parent_getter = compose(*self._getters[target.__class__][:-<NUM_LIT:1>])<EOL>target = parent_getter(target)<EOL>func = self._make_setter(self.path.split('<STR_LIT:.>')[-<NUM_LIT:1>], target.__class__)<EOL>func(target, value)<EOL>def setter(target, value):<EOL><INDENT>func(parent_getter(target), value)<EOL><DEDENT>self.set = setter<EOL>
Set the value of this attribute for the passed object.