Mercurial > public > mercurial-scm > hg-stable
diff mercurial/demandimport.py @ 31649:f80d9ddc40f3
py3: abuse r'' to preserve str-ness of literals passed to __setattr__()
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 26 Mar 2017 16:33:12 +0900 |
parents | 1914db1b7d9e |
children | 3e03a4b9ec8c |
line wrap: on
line diff
--- a/mercurial/demandimport.py Sun Mar 26 17:12:06 2017 +0900 +++ b/mercurial/demandimport.py Sun Mar 26 16:33:12 2017 +0900 @@ -76,9 +76,9 @@ else: head = name after = [] - object.__setattr__(self, "_data", + object.__setattr__(self, r"_data", (head, globals, locals, after, level, set())) - object.__setattr__(self, "_module", None) + object.__setattr__(self, r"_module", None) def _extend(self, name): """add to the list of submodules to load""" self._data[3].append(name) @@ -138,7 +138,7 @@ if modref and getattr(modref, head, None) == self: setattr(modref, head, mod) - object.__setattr__(self, "_module", mod) + object.__setattr__(self, r"_module", mod) def __repr__(self): if self._module: