Lines Matching refs:parent
112 def Set(self, parent, child_name, new_child):
114 of the given parent. The parent could be a module when the child is a
115 function at module scope. Or the parent could be a class when a class'
120 classmethod of parent.
122 old_child = getattr(parent, child_name)
124 old_attribute = parent.__dict__.get(child_name)
128 self.cache.append((parent, old_child, child_name))
129 setattr(parent, child_name, new_child)
141 for (parent, old_child, child_name) in self.cache:
142 setattr(parent, child_name, old_child)