python - How should method names be named in a send/receive environment? -
python - How should method names be named in a send/receive environment? -
this question posed in python context extends other languages. doing creating simulation distributes systems in network , want have ability of sending messages nodes other adjacent nodes in network. have written node class.
i understand how finish problem of simulating network, problem this: if want node send message node, how should name methods best readability? have this:
class node: def send_message( self, othernode, message ): othernode.receive_message( self, message ) def receive_message( self, othernode, message ): # do message
but term "receive_message" feels wrong. there standard situation?
python oop
Comments
Post a Comment