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

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -