equal
deleted
inserted
replaced
126 return False |
126 return False |
127 |
127 |
128 def unique(g): |
128 def unique(g): |
129 """return the uniq elements of iterable g""" |
129 """return the uniq elements of iterable g""" |
130 seen = {} |
130 seen = {} |
|
131 l = [] |
131 for f in g: |
132 for f in g: |
132 if f not in seen: |
133 if f not in seen: |
133 seen[f] = 1 |
134 seen[f] = 1 |
134 yield f |
135 l.append(f) |
|
136 return l |
135 |
137 |
136 class Abort(Exception): |
138 class Abort(Exception): |
137 """Raised if a command needs to print an error and exit.""" |
139 """Raised if a command needs to print an error and exit.""" |
138 |
140 |
139 def always(fn): return True |
141 def always(fn): return True |