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

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -