##// END OF EJS Templates
use parent.__setattr__ instead of __dict__
Benoit Boissinot -
r3896:3b628b5d default
parent child Browse files
Show More
@@ -35,8 +35,8 b' class _demandmod(object):'
35 else:
35 else:
36 head = name
36 head = name
37 after = []
37 after = []
38 self.__dict__["_data"] = (head, globals, locals, after)
38 object.__setattr__(self, "_data", (head, globals, locals, after))
39 self.__dict__["_module"] = None
39 object.__setattr__(self, "_module", None)
40 def _extend(self, name):
40 def _extend(self, name):
41 """add to the list of submodules to load"""
41 """add to the list of submodules to load"""
42 self._data[3].append(name)
42 self._data[3].append(name)
@@ -54,7 +54,7 b' class _demandmod(object):'
54 # are we in the locals dictionary still?
54 # are we in the locals dictionary still?
55 if locals and locals.get(head) == self:
55 if locals and locals.get(head) == self:
56 locals[head] = mod
56 locals[head] = mod
57 self.__dict__["_module"] = mod
57 object.__setattr__(self, "_module", mod)
58 def __repr__(self):
58 def __repr__(self):
59 return "<unloaded module '%s'>" % self._data[0]
59 return "<unloaded module '%s'>" % self._data[0]
60 def __call__(self, *args, **kwargs):
60 def __call__(self, *args, **kwargs):
General Comments 0
You need to be logged in to leave comments. Login now