class foo(HTMLCalendar): def formatday(self, day, weekday, data): if day==0 return '<td class="noday"> </td>' else: return '<td class="%s">%d %s</td>' % (self.cssclasses[weekday], day, data) a = foo() a.formatmonth(1, 2)每當我嘗試它給我一個錯誤時,說formatday()恰好接受4個參數(shù)(給定3個)。我試圖覆蓋formatday方法,以便可以在其中放入一些數(shù)據(jù)。有人可以告訴我我在做什么錯嗎?
添加回答
舉報
0/150
提交
取消