]> git.notmuchmail.org Git - notmuch/commit - bindings/python/notmuch/message.py
python: Implement Message.__cmp__ and __hash__
authorSebastian Spaeth <Sebastian@SSpaeth.de>
Wed, 15 Jun 2011 13:05:47 +0000 (15:05 +0200)
committerSebastian Spaeth <Sebastian@SSpaeth.de>
Wed, 15 Jun 2011 13:05:47 +0000 (15:05 +0200)
commit4557af30649e7fdf11b8194e405cb272f13887da
treed396173431e52bd2e875dccac84b74e028956292
parent8866a89e3cff46dbd791a1385ca5c800a5c9091e
python: Implement Message.__cmp__ and __hash__

We can now do: if msg1 == msg2, and we can use set arithmetic on
Messages():
  s1, s2= msgs1, msgs2
  s1.union(s2)
  s2 -= s1

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
bindings/python/notmuch/message.py