On Fri, Jul 31, 2009 at 4:20 PM, Laurens Van Houtven <l...@laurensvh.be>wrote:
> Also, regarding the message classes at every level: does this include > the top level? I thought the top level (eg most abstracted) would > contain a number of callbacks, such as: > > positionReceived(self, latitude, longitude) > positionErrorReceived(self, hdop, vdop, pdop) > altitudeReceived(self, altitude) > altitudeErrorReceived(self, ...) > > Et cetera. A sentence at this level seems a bit superfluous, but I can > see it being somewhat useful internally. I don't have a strong preference either way. My point about having a "sentenceReceived" at the lower levels has more to do with the question of where to factor the dispatch: *interfaces* typically shouldn't have prefix_Foo methods on them, since you can always have an unexpected prefix_Bar if the dispatch mechanism is expanded. However, "positionReceived" has nice, well-defined semantics of its own, so the interface you've outlined here sounds good to me.
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python