python object takes no parameters

AttributeError: 'str' object has no attribute 'write'

loren41 6 OS is Ubuntu Linux 9.10/Python Version is 2.6.4/Gui Tool is Dr. Python My program has a large html-coded string called tarr_record. When I
热度:0℃

Python 3 报错 TypeError: object() takes no parameters【新手必过坑之一】 TRHX

():def__init__(self,name,age):#初始化属性name和ageself.name=name self.age=agedefsit(self):#模拟小狗被命令时蹲下print(self.name.title()+" is now sitting.")def
热度:0℃