diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-05-09 16:34:10 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-05-09 16:34:10 +0000 |
| commit | 4a6afd469fad170868554bf28578849bf3dfd5dd (patch) | |
| tree | b396edc33d567ae19dd244e87137296450467725 /lib/sqlalchemy/ext/associationproxy.py | |
| parent | 46b7c9dc57a38d5b9e44a4723dad2ad8ec57baca (diff) | |
| download | sqlalchemy-4a6afd469fad170868554bf28578849bf3dfd5dd.tar.gz | |
r4695 merged to trunk; trunk now becomes 0.5.
0.4 development continues at /sqlalchemy/branches/rel_0_4
Diffstat (limited to 'lib/sqlalchemy/ext/associationproxy.py')
| -rw-r--r-- | lib/sqlalchemy/ext/associationproxy.py | 77 |
1 files changed, 57 insertions, 20 deletions
diff --git a/lib/sqlalchemy/ext/associationproxy.py b/lib/sqlalchemy/ext/associationproxy.py index d878f7b9b..4d54f6072 100644 --- a/lib/sqlalchemy/ext/associationproxy.py +++ b/lib/sqlalchemy/ext/associationproxy.py @@ -406,13 +406,26 @@ class _AssociationList(object): def clear(self): del self.col[0:len(self.col)] - def __eq__(self, other): return list(self) == other - def __ne__(self, other): return list(self) != other - def __lt__(self, other): return list(self) < other - def __le__(self, other): return list(self) <= other - def __gt__(self, other): return list(self) > other - def __ge__(self, other): return list(self) >= other - def __cmp__(self, other): return cmp(list(self), other) + def __eq__(self, other): + return list(self) == other + + def __ne__(self, other): + return list(self) != other + + def __lt__(self, other): + return list(self) < other + + def __le__(self, other): + return list(self) <= other + + def __gt__(self, other): + return list(self) > other + + def __ge__(self, other): + return list(self) >= other + + def __cmp__(self, other): + return cmp(list(self), other) def __add__(self, iterable): try: @@ -534,13 +547,26 @@ class _AssociationDict(object): def clear(self): self.col.clear() - def __eq__(self, other): return dict(self) == other - def __ne__(self, other): return dict(self) != other - def __lt__(self, other): return dict(self) < other - def __le__(self, other): return dict(self) <= other - def __gt__(self, other): return dict(self) > other - def __ge__(self, other): return dict(self) >= other - def __cmp__(self, other): return cmp(dict(self), other) + def __eq__(self, other): + return dict(self) == other + + def __ne__(self, other): + return dict(self) != other + + def __lt__(self, other): + return dict(self) < other + + def __le__(self, other): + return dict(self) <= other + + def __gt__(self, other): + return dict(self) > other + + def __ge__(self, other): + return dict(self) >= other + + def __cmp__(self, other): + return cmp(dict(self), other) def __repr__(self): return repr(dict(self.items())) @@ -802,12 +828,23 @@ class _AssociationSet(object): def copy(self): return util.Set(self) - def __eq__(self, other): return util.Set(self) == other - def __ne__(self, other): return util.Set(self) != other - def __lt__(self, other): return util.Set(self) < other - def __le__(self, other): return util.Set(self) <= other - def __gt__(self, other): return util.Set(self) > other - def __ge__(self, other): return util.Set(self) >= other + def __eq__(self, other): + return util.Set(self) == other + + def __ne__(self, other): + return util.Set(self) != other + + def __lt__(self, other): + return util.Set(self) < other + + def __le__(self, other): + return util.Set(self) <= other + + def __gt__(self, other): + return util.Set(self) > other + + def __ge__(self, other): + return util.Set(self) >= other def __repr__(self): return repr(util.Set(self)) |
