Re: [PATCH 2/2] python: make the result of Message.get_replies() more pythonic

2012-01-03 Thread Sebastian Spaeth
On Wed, 21 Dec 2011 14:15:02 +0100, Justus Winter <4win...@informatik.uni-hamburg.de> wrote: > 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 a

[PATCH 2/2] python: make the result of Message.get_replies() more pythonic

2012-01-02 Thread Sebastian Spaeth
On Wed, 21 Dec 2011 14:15:02 +0100, Justus Winter <4winter at informatik.uni-hamburg.de> wrote: > 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 addin

[PATCH 2/2] python: make the result of Message.get_replies() more pythonic

2012-01-02 Thread Tomi Ollila
On Wed, 21 Dec 2011 14:15:02 +0100, Justus Winter <4winter at informatik.uni-hamburg.de> wrote: > 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 addin

Re: [PATCH 2/2] python: make the result of Message.get_replies() more pythonic

2012-01-02 Thread Tomi Ollila
On Wed, 21 Dec 2011 14:15:02 +0100, Justus Winter <4win...@informatik.uni-hamburg.de> wrote: > 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 a

[PATCH 2/2] python: make the result of Message.get_replies() more pythonic

2011-12-21 Thread Justus Winter
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

[PATCH 2/2] python: make the result of Message.get_replies() more pythonic

2011-12-21 Thread Justus Winter
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