Mac*_*cha 0 python syntax syntax-error
这段代码:
class Todo:
def addto(self, list_name="", text=""):
"""
Adds an item to the specified list.
"""
if list_name == "":
list_name = sys.argv[2]
text = ''.join(sys.argv[3:]
todo_list = TodoList(getListFilename(list_name))
Run Code Online (Sandbox Code Playgroud)
产生语法错误,小箭头指向todo_list最后一行.
该__init__对方法TodoList是在这里:
def __init__(self, json_location):
"""
Sets up the list.
"""
self.json_location = json_location
self.load()
Run Code Online (Sandbox Code Playgroud)
我对Python很陌生,所以我不明白我在做错了什么.
jbo*_*chi 11
你需要关闭这个)
text = ''.join(sys.argv[3:]
Run Code Online (Sandbox Code Playgroud)