templater: hide private variable of _hybrid
authorYuya Nishihara <yuya@tcha.org>
Tue, 04 Apr 2017 22:20:06 +0900
changeset 31881 31dad7a5b4ed
parent 31880 a0f2d83f8083
child 31882 ba5b74f780d5
templater: hide private variable of _hybrid
mercurial/templatekw.py
--- a/mercurial/templatekw.py	Tue Apr 04 22:19:02 2017 +0900
+++ b/mercurial/templatekw.py	Tue Apr 04 22:20:06 2017 +0900
@@ -32,21 +32,21 @@
 
     def __init__(self, gen, values, makemap, joinfmt):
         self.gen = gen
-        self.values = values
+        self._values = values
         self._makemap = makemap
         self.joinfmt = joinfmt
     def itermaps(self):
         makemap = self._makemap
-        for x in self.values:
+        for x in self._values:
             yield makemap(x)
     def __contains__(self, x):
-        return x in self.values
+        return x in self._values
     def __len__(self):
-        return len(self.values)
+        return len(self._values)
     def __getattr__(self, name):
         if name != 'get':
             raise AttributeError(name)
-        return getattr(self.values, name)
+        return getattr(self._values, name)
 
 def unwraphybrid(thing):
     """Return an object which can be stringified possibly by using a legacy