[Twisted-Python] twisted.positioning: status report and request for comments/feedback
glyph at twistedmatrix.com
Fri Jul 31 16:28:22 EDT 2009
On Fri, Jul 31, 2009 at 4:20 PM, Laurens Van Houtven <lvh at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python