Closed kasemir closed 9 years ago
See 72c856a83d6dd538d6832027bf335f5ee3a70c30:
Comment used to print as
Comment(Comment='Hello')
Now it's
which is shorter plus valid python code that could be pasted in a python shell.
Similar: Parallel command prints for example as
Parallel() Parallel(Comment('One')) Parallel(Comment('One'), Comment('Two')) Parallel(Comment('One'), Comment('Two'), timeout=10) Parallel(Comment('One'), Comment('Two'), errHandler="MyHandler")
which is quite short, readable and represents valid constructor calls.
For the Set command, note the handling of string vs. numeric value:
Set(device='some_device',value=3.14) Set(device='some_device',value='Text')
All commands should use that as their __repr__(), and unless we find a good reason, the toCmdString() should be the same.
__repr__()
toCmdString()
See 72c856a83d6dd538d6832027bf335f5ee3a70c30:
Comment used to print as
Now it's
which is shorter plus valid python code that could be pasted in a python shell.
Similar: Parallel command prints for example as
which is quite short, readable and represents valid constructor calls.
For the Set command, note the handling of string vs. numeric value:
All commands should use that as their
__repr__()
, and unless we find a good reason, thetoCmdString()
should be the same.