##// END OF EJS Templates
templater: hide private variable of _hybrid
Yuya Nishihara -
r31881:31dad7a5 default
parent child Browse files
Show More
@@ -32,21 +32,21 b' class _hybrid(object):'
32
32
33 def __init__(self, gen, values, makemap, joinfmt):
33 def __init__(self, gen, values, makemap, joinfmt):
34 self.gen = gen
34 self.gen = gen
35 self.values = values
35 self._values = values
36 self._makemap = makemap
36 self._makemap = makemap
37 self.joinfmt = joinfmt
37 self.joinfmt = joinfmt
38 def itermaps(self):
38 def itermaps(self):
39 makemap = self._makemap
39 makemap = self._makemap
40 for x in self.values:
40 for x in self._values:
41 yield makemap(x)
41 yield makemap(x)
42 def __contains__(self, x):
42 def __contains__(self, x):
43 return x in self.values
43 return x in self._values
44 def __len__(self):
44 def __len__(self):
45 return len(self.values)
45 return len(self._values)
46 def __getattr__(self, name):
46 def __getattr__(self, name):
47 if name != 'get':
47 if name != 'get':
48 raise AttributeError(name)
48 raise AttributeError(name)
49 return getattr(self.values, name)
49 return getattr(self._values, name)
50
50
51 def unwraphybrid(thing):
51 def unwraphybrid(thing):
52 """Return an object which can be stringified possibly by using a legacy
52 """Return an object which can be stringified possibly by using a legacy
General Comments 0
You need to be logged in to leave comments. Login now