From: Mike Bayer Date: Fri, 16 Sep 2005 07:37:29 +0000 (+0000) Subject: (no commit message) X-Git-Tag: rel_0_1_0~717 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c8817ec72e9b7fa7b6080e45f5b6ad954ae9da1;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git --- diff --git a/lib/sqlalchemy/util.py b/lib/sqlalchemy/util.py index 6f2478a92f..3ff237beae 100644 --- a/lib/sqlalchemy/util.py +++ b/lib/sqlalchemy/util.py @@ -114,7 +114,10 @@ class HashSet(object): def append(self, item): self.map[item] = item - + + def __add__(self, other): + return HashSet(self.map.values() + [i for i in other]) + def __len__(self): return len(self.map) @@ -149,7 +152,7 @@ class HistoryArraySet(UserList.UserList): del self.data[i] i -= 1 - def hash(self): + def __hash__(self): return id(self) def _setrecord(self, item): try: