TypeError: __init__() takes exactly 1 argument (3 given) pyXML

后端 未结 2 2046
没有蜡笔的小新
没有蜡笔的小新 2021-01-19 19:48

I\'ve recently started to learn how to use python to parse xml files. I took the tutorial from http://pyxml.sourceforge.net/topics/howto/node12.html

When I run the f

2条回答
  •  一整个雨季
    2021-01-19 20:09

    You've got too many _ in the name of __init__. The declaration of your constructor should be:

    def __init__(self, title, number):
    

    not:

    def __init___(self, title, number):
    

提交回复
热议问题