Lines Matching refs:parent
109 def Set(self, parent, child_name, new_child):
111 of the given parent. The parent could be a module when the child is a
112 function at module scope. Or the parent could be a class when a class'
117 classmethod of parent.
119 old_child = getattr(parent, child_name)
121 old_attribute = parent.__dict__.get(child_name)
125 self.cache.append((parent, old_child, child_name))
126 setattr(parent, child_name, new_child)
138 for (parent, old_child, child_name) in self.cache:
139 setattr(parent, child_name, old_child)