Mercurial > hg
changeset 3896:3b628b5da9e9
use parent.__setattr__ instead of __dict__
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Thu, 14 Dec 2006 23:51:41 +0100 |
parents | 79e5a6e7c451 |
children | 7034020aeaf9 |
files | mercurial/demandimport.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/demandimport.py Thu Dec 14 13:49:33 2006 -0800 +++ b/mercurial/demandimport.py Thu Dec 14 23:51:41 2006 +0100 @@ -35,8 +35,8 @@ else: head = name after = [] - self.__dict__["_data"] = (head, globals, locals, after) - self.__dict__["_module"] = None + object.__setattr__(self, "_data", (head, globals, locals, after)) + object.__setattr__(self, "_module", None) def _extend(self, name): """add to the list of submodules to load""" self._data[3].append(name) @@ -54,7 +54,7 @@ # are we in the locals dictionary still? if locals and locals.get(head) == self: locals[head] = mod - self.__dict__["_module"] = mod + object.__setattr__(self, "_module", mod) def __repr__(self): return "<unloaded module '%s'>" % self._data[0] def __call__(self, *args, **kwargs):