##// END OF EJS Templates
ancestors: add a __nonzero__ method...
Pierre-Yves David -
r22225:baecf4e1 default
parent child Browse files
Show More
@@ -246,6 +246,14 b' class lazyancestors(object):'
246 else:
246 else:
247 self._containsseen = set()
247 self._containsseen = set()
248
248
249 def __nonzero__(self):
250 """False if the set is empty, True otherwise."""
251 try:
252 iter(self).next()
253 return True
254 except StopIteration:
255 return False
256
249 def __iter__(self):
257 def __iter__(self):
250 """Generate the ancestors of _initrevs in reverse topological order.
258 """Generate the ancestors of _initrevs in reverse topological order.
251
259
General Comments 0
You need to be logged in to leave comments. Login now