diff options
author | Michael Trier <mtrier@gmail.com> | 2009-07-27 02:12:15 +0000 |
---|---|---|
committer | Michael Trier <mtrier@gmail.com> | 2009-07-27 02:12:15 +0000 |
commit | 34aaabf7ea18af8e8a7721238b5bba00e3532c4c (patch) | |
tree | e1073f8dc9a4b1b643e79a658b00a09c7da4d569 /examples/pickle/custom_pickler.py | |
parent | 73554aa4fa60459cd949ca8ac690ac0746a7c445 (diff) | |
download | sqlalchemy-34aaabf7ea18af8e8a7721238b5bba00e3532c4c.tar.gz |
Added in Examples into the test suite so they get exercised regularly. Cleaned up some deprecation warnings in the examples.
Diffstat (limited to 'examples/pickle/custom_pickler.py')
-rw-r--r-- | examples/pickle/custom_pickler.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/pickle/custom_pickler.py b/examples/pickle/custom_pickler.py index 79a8b3fa3..a02b708e5 100644 --- a/examples/pickle/custom_pickler.py +++ b/examples/pickle/custom_pickler.py @@ -68,7 +68,13 @@ class Foo(object): class Bar(object): def __init__(self, value): self.data = value - + + def __eq__(self, other): + if not other is None: + return self.data == other.data + return NotImplemented + + mapper(Foo, foo_table, extension=MyExt()) mapper(Bar, bar_table) |