aboutsummaryrefslogtreecommitdiffhomepage
path: root/bindings/python/notmuch/database.py
diff options
context:
space:
mode:
authorGravatar Justus Winter <4winter@informatik.uni-hamburg.de>2011-12-21 14:15:02 +0100
committerGravatar Sebastian Spaeth <Sebastian@SSpaeth.de>2012-01-02 17:01:40 +0100
commitada246aa20c2f9b1e225bc50865e208d03296fc0 (patch)
tree7b70e177bf8d404c1b5b68a589c6f50d14ed89fd /bindings/python/notmuch/database.py
parente32c8a5e6bcc7bdbf5e1a5800ac42e25dc8ca70e (diff)
python: make the result of Message.get_replies() more pythonic
Formerly Message.get_replies() returned an iterator or None forcing users to check the result before iterating over it leading to strange looking code at the call site. Fix this flaw by adding an EmptyMessagesResult class that behaves like the Messages class but immediatly raises StopIteration if used as an iterator and returning objects of this type from Message.get_replies() to indicate that there are no replies.
Diffstat (limited to 'bindings/python/notmuch/database.py')
0 files changed, 0 insertions, 0 deletions