z25 / pyZOCP

Python ZOCP implementation (Z25 Orchestration Control Protocol)
GNU Lesser General Public License v3.0
33 stars 5 forks source link

Problem: Do method names make sense? #40

Open sphaero opened 9 years ago

sphaero commented 9 years ago

How do you find the the method names we have now? Do they make sense? Are they confusing?

I want to make sure they make sense immediately. This counts for the debug log as well. Method names we have now, amongst others:

fieldOfView commented 9 years ago

Note that there is an ongoing discussion about consistency in arguments between some of the onpeer* methods: https://github.com/z25/pyZOCP/pull/34

fieldOfView commented 9 years ago

I am not dead-set on emit_signal as a method name. What it actually does (currently) is that it updates a value in the capability-tree and sends out signals to subscribed nodes. A name like set_capability_value or set_value may be more consistent.

fieldOfView commented 9 years ago

Should get_message be _get_message and be semi-private? Or can we think of a public use for get_message?

sphaero commented 9 years ago

Yeah this might be semi_private. But what if you implement your own loop and you already have a socket listener yourself. Then you don't want to call run_once() but rather do it yourself? I'm not sure if this holds.