 <p>The global <code>cansend()</code> function is generic and can be called from anywhere so I'd probably leave this function as-is unless every invocation of <code>cansend()</code> is from a node class.</p> <p>You could add a <code>cansend()</code> method to your class which uses the stored instance variables as input, rather than having them set as parameters. Furthermore, if you're interested in using properties you could have the <code>operatingMode</code> configured as a property as you suggested.</p> <p>Here's an example refactor:</p> <pre><code>def cansend(nodeID,busID,value): '''sends a CAN frame with a particular value to a specific node''' class node(object): def __init__(self,nodeID,busID,operatingMode): self.nodeID = nodeID self.busID = busID self._operatingMode = operatingMode self.send_can_mode() def send_can_mode(self): """Send current operating mode to node on CAN bus.""" cansend(self.nodeID, self.busID, self._operatingMode) @property def operatingMode(self): """Return current operating mode.""" return self._operatingMode @operatingMode.setter def operatingMode(self, value): """Modify operating mode. Update remote node if mode changes.""" if value == self._operatingMode: return self._operatingMode = value self.send_can_mode() </code></pre> <p>When you want to change modes, you can do <code>node.operatingMode = newMode</code> and if the mode has changed from the previous state, the new mode will be automatically sent.</p> <p>The global <code>cansend()</code> is only called from the <code>send_can_mode()</code> method so you could integrate the global <code>cansend()</code> into your class if desired.</p>