TypeError:__init__() 僅接收 1 個引數(給定 5 個)


您需要縮排所有方法定義,以便它們位於類的下面。 

示例

class A():

def __init__():

pass


您可以在此處瞭解有關縮排及其如何在 Python 中使用需求的詳細資訊 −

https://tutorialspoint.tw/python_online_training/python_lines_and_indentation.asp

更新於: 2020-03-06

146 次瀏覽

開啟你的 職業生涯

完成課程即可獲得認證

開始學習
廣告
© . All rights reserved.