changeset 29216 | ead25aa27a43 |
parent 25915 | 7ef98b38163f |
child 31483 | 413b44003462 |
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): |