Home | History | Annotate | Download | only in python

Lines Matching refs:obj

42   def SmartSet(self, obj, attr_name, new_attr):
43 """Replace obj.attr_name with new_attr. This method is smart and works
49 classmethod of obj.
52 - If obj is an instance, then it is its class that will actually be
53 stubbed. Note that the method Set() does not do that: if obj is
57 probably be to manipulate obj.__dict__ instead of getattr() and
62 if (inspect.ismodule(obj) or
63 (not inspect.isclass(obj) and obj.__dict__.has_key(attr_name))):
64 orig_obj = obj
65 orig_attr = getattr(obj, attr_name)
68 if not inspect.isclass(obj):
69 mro = list(inspect.getmro(obj.__class__))
71 mro = list(inspect.getmro(obj))
80 orig_attr = getattr(obj, attr_name)
89 old_attribute = obj.__dict__.get(attr_name)