用Python3运行main.py时
Traceback (most recent call last):
File "main.py", line 3, in <module>
name = user(id)
File "/root/coding/sse/User.py", line 37, in __init__
self.id = self.id + id
TypeError: unsupported operand type(s) for +: 'int' and 'builtin_function_or_method'
报这个问题有没有人帮忙解决一下
对应位置的代码如下
line 3处
from User import user
#name依你所好, id不重要,是数字就行
name = user(id)
savetext1, savekey1 = name.SaveText("test1.txt", "test1key.txt")
name.Storge(savetext1, savekey1)
ans = name.Find("可搜索加密;")
def __init__(self, id):
self.id = self.id + id
def GetID(self):
return self.id