0

このコード:

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が初めてなので、ここで何が間違っているのかわかりません。

4

1 に答える 1

11

これを閉じる必要があります)

text = ''.join(sys.argv[3:]
于 2009-12-23T21:35:35.870 に答える