equal
deleted
inserted
replaced
249 return False |
249 return False |
250 |
250 |
251 def unique(g): |
251 def unique(g): |
252 """return the uniq elements of iterable g""" |
252 """return the uniq elements of iterable g""" |
253 return dict.fromkeys(g).keys() |
253 return dict.fromkeys(g).keys() |
|
254 |
|
255 def sort(l): |
|
256 if not isinstance(l, list): |
|
257 l = list(l) |
|
258 l.sort() |
|
259 return l |
254 |
260 |
255 class Abort(Exception): |
261 class Abort(Exception): |
256 """Raised if a command needs to print an error and exit.""" |
262 """Raised if a command needs to print an error and exit.""" |
257 |
263 |
258 class UnexpectedOutput(Abort): |
264 class UnexpectedOutput(Abort): |