diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-11-18 16:32:47 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-11-18 16:32:47 +0000 |
commit | 268834989c282963e42cc7bf27d17bcb59dca7a0 (patch) | |
tree | 8f9164b0843af842580a4fe2f4423a488436818b /lib | |
parent | 177c2219c6eacd872ab40dc48d5c9493e07ba264 (diff) | |
download | sqlalchemy-268834989c282963e42cc7bf27d17bcb59dca7a0.tar.gz |
- PickleType will compare using `==` when set up with mutable=False,
and not the `is` operator. To use `is` or any other comparator, send
in a custom comparison function using PickleType(comparator=my_custom_comparator).
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sqlalchemy/types.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/types.py b/lib/sqlalchemy/types.py index 48a6af030..b27530987 100644 --- a/lib/sqlalchemy/types.py +++ b/lib/sqlalchemy/types.py @@ -501,7 +501,7 @@ class PickleType(MutableType, TypeDecorator): elif self.mutable: return self.pickler.dumps(x, self.protocol) == self.pickler.dumps(y, self.protocol) else: - return x is y + return x == y def is_mutable(self): return self.mutable |