Revision e687ec01 lib/compat.py

b/lib/compat.py
67 67
    return False
68 68
  return True
69 69

  
70

  
70 71
def _any(seq):
71 72
  """Returns True if any element of the iterable are True.
72 73

  
......
75 76
    return True
76 77
  return False
77 78

  
79

  
78 80
try:
79 81
  # pylint: disable-msg=E0601
80 82
  # pylint: disable-msg=W0622
......
89 91
except NameError:
90 92
  any = _any
91 93

  
94

  
92 95
def partition(seq, pred=bool): # pylint: disable-msg=W0622
93 96
  """Partition a list in two, based on the given predicate.
94 97

  

Also available in: Unified diff