我尝试使用以下代码连接2个字符串:
def __get_temp(self):
return float(self.ask('RS'))
def __set_temp(self, temp):
set = ('SS' + repr(temp))
stat = self.ask(set)
return self.check(stat)
temp = property(__get_temp, __set_temp)
然后,我一起使用pyvisa通过串行总线发送信号。但是,当我试图调用函数时,我得到
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
chil.temp(13)
TypeError: 'float' object is not callable
我试着四处寻找这个错误的解释,但没有一个是有意义的。有人知道发生了什么事吗?