Show More
@@ -224,13 +224,7 b' def binary(s):' | |||
|
224 | 224 | |
|
225 | 225 | def unique(g): |
|
226 | 226 | """return the uniq elements of iterable g""" |
|
227 | seen = {} | |
|
228 | l = [] | |
|
229 | for f in g: | |
|
230 | if f not in seen: | |
|
231 | seen[f] = 1 | |
|
232 | l.append(f) | |
|
233 | return l | |
|
227 | return dict.fromkeys(g).keys() | |
|
234 | 228 | |
|
235 | 229 | class Abort(Exception): |
|
236 | 230 | """Raised if a command needs to print an error and exit.""" |
General Comments 0
You need to be logged in to leave comments.
Login now