TypeError:__init__() 僅接收 1 個引數(給定 5 個)
您需要縮排所有方法定義,以便它們位於類的下面。
示例
class A(): def __init__(): pass
您可以在此處瞭解有關縮排及其如何在 Python 中使用需求的詳細資訊 −
https://tutorialspoint.tw/python_online_training/python_lines_and_indentation.asp
廣告
您需要縮排所有方法定義,以便它們位於類的下面。
class A(): def __init__(): pass
您可以在此處瞭解有關縮排及其如何在 Python 中使用需求的詳細資訊 −
https://tutorialspoint.tw/python_online_training/python_lines_and_indentation.asp