[Twisted-Python] naming conversational methods

Generally in an object model, if I'm an object, my methods are things I do. If someone says kevin.run(), I run. If they say kevin.jump(height), I jump, and if they say kevin.watch(), I keep my eyes open. But if a perspective is addressing me me through a viewpoint, how should my methods which act upon her be named? If she says to herself, "Self, listen to Kevin," that seems natural to write as self.listen(kevin). Except, in order for her to listen to me, she needs to have me add her to my list of my audience members. So how does her listen method address me? Not as kevin.listen(), because she's the one listening, not me. kevin.speak()? No, she's not commanding me to speak, she just wants to know in the event that I do. kevin.speakTo() seems odd without an object. Someone else could say kevin.speakTo(her), but what she really means is kevin.speakToMe(). Does that work? class Kevin(pb.Viewable): def view_speakToMe(self, perspective): """I will now speak to she who invoked this method.""" # Does it make sense that the personal pronoun in "speakToMe" # refers not to *me*, but to the perspective's owner? # Or does a passive phrasing make more sense? def view_beListenedTo(self, perspective): """This perspective will be listening to me.""" -- Kevin Turner <acapnotic@twistedmatrix.com> | OpenPGP encryption welcome here The moon is waning cresent, 46.0% illuminated, 22.5 days old.

On Wed, 10 Oct 2001 12:48:30 -0700, Kevin wrote:
But if a perspective is addressing me me through a viewpoint, how should my methods which act upon her be named?
http://www.datec.at/dev__python__design_patterns__observer.html http://www.users.qwest.net/~hartkopf/notifier/ http://www.togethercommunity.com/coad-letter/strategy_handbook_original/ Strpat00000088.html

On Wed, 10 Oct 2001 12:48:30 -0700, Kevin wrote:
But if a perspective is addressing me me through a viewpoint, how should my methods which act upon her be named?
http://www.datec.at/dev__python__design_patterns__observer.html http://www.users.qwest.net/~hartkopf/notifier/ http://www.togethercommunity.com/coad-letter/strategy_handbook_original/ Strpat00000088.html
participants (2)
-
j.her@t-online.de
-
Kevin Turner