comparison mercurial/ancestor.py @ 29216:ead25aa27a43

py3: convert to next() function next(..) was introduced in py2.6 and .next() is not available in py3 https://docs.python.org/2/library/functions.html#next
author timeless <timeless@mozdev.org>
date Mon, 16 May 2016 21:30:53 +0000
parents 7ef98b38163f
children 413b44003462
comparison
equal deleted inserted replaced
29215:f5983805574e 29216:ead25aa27a43
289 self._containsseen = set() 289 self._containsseen = set()
290 290
291 def __nonzero__(self): 291 def __nonzero__(self):
292 """False if the set is empty, True otherwise.""" 292 """False if the set is empty, True otherwise."""
293 try: 293 try:
294 iter(self).next() 294 next(iter(self))
295 return True 295 return True
296 except StopIteration: 296 except StopIteration:
297 return False 297 return False
298 298
299 def __iter__(self): 299 def __iter__(self):