I'm writing a driver in Python 2.6 and I need it to be reverse compatible with a previous implementation (I don't have access to the source code).
class new_driver ():
def output(self, state):
if state == True:
self.set_ouput_on()
else:
self.set_output_off()
...
The odd thing is that to keep compatibility I have to pass this output using the format
nd = new_driver()
nd.output = True
How do I pass a value in this way?
Edit: To clarify: my "output" function has to receive the value True in this way in order to execute the function self.set_output_on()
nd.outputto be boolean or what?