ryanmcgrath/twython — pull request #225 by extesy (2013-06-19 20:25:16+00:00)
Title: Refactor message handling in TwythonStreamer

New parameter `handlers` has a list of message types for which
corresponding handlers should be called. For example, for default message types
['delete', 'limit', 'disconnect'] handlers on_delete, on_limit,
on_disconnect will be invoked if the streamed message has the
corresponding data node. If the handler returns True then more handlers
might be invoked, otherwise message processing stops. Before all
handlers are called, special on_success handler is invoked with the same
logic: continue message processing if True is returned.

This approach maintains backwards compatibility by not breaking any
existing behaviors. Fixes #223.