Please explain the logic


#1

class Test():
def init(self,parent):
self._parent = parent
self._id = id

    def _command(self,cmd):
	cmd = '%d %s' %(self._id, cmd)
	result = self._parent._command(cmd)

defining command, in the same method it is called self.parent._command(cmd)


#2

@sonupratz What exactly do you not understand?


#3

Ah, found it! You need one more parameter. id


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.