author | Matt Mackall <mpm@selenic.com> |
Thu, 27 Dec 2007 23:55:40 -0600 | |
changeset 5881 | 4bb64294e5b4 |
parent 5880 | b32a0596b2d7 |
child 5882 | f791a2acf11b |
mercurial/util.py | file | annotate | diff | comparison | revisions |
--- a/mercurial/util.py Sat Jan 19 14:39:30 2008 +0100 +++ b/mercurial/util.py Thu Dec 27 23:55:40 2007 -0600 @@ -236,13 +236,7 @@ def unique(g): """return the uniq elements of iterable g""" - seen = {} - l = [] - for f in g: - if f not in seen: - seen[f] = 1 - l.append(f) - return l + return dict.fromkeys(g).keys() class Abort(Exception): """Raised if a command needs to print an error and exit."""