このコード:
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))
todo_list
最後の行にある小さな矢印が指す構文エラーを生成します。
の__init__
方法TodoList
は次のとおりです。
def __init__(self, json_location):
"""
Sets up the list.
"""
self.json_location = json_location
self.load()
私はPythonが初めてなので、ここで何が間違っているのかわかりません。