Jump to content
Chapter 6 - Class Question
3 replies to this topic
Posted 29 May 2011 - 03:47 PM
On page 194. I do the following in IDLE:
def _init_(self, a_name, a_dob=None, a_times=):
>>> sarah = Athlete('Sarah Sweeny', '2002-6-17', ['2:58', '2:58', '1:56'])
Traceback (most recent call last):
File "<pyshell#58>", line 1, in <module>
sarah = Athlete('Sarah Sweeny', '2002-6-17', ['2:58', '2:58', '1:56'])
TypeError: object.__new__() takes no parameters
Should I be getting that error response? I can't seem to see what I may have typed wrong.
I am using windows 7 and python 3.2.
Posted 29 May 2011 - 04:06 PM
I found my issue. Forgot to use double underscores. Works now. Thanks,
Posted 11 October 2013 - 12:44 AM
God!! I have different bug with yours,but your answer saves me.Thank u very much. I think the editor should add this as a notice.
Posted 13 October 2013 - 05:09 AM
Yes, I've made a note to highlight it in the second edition. Thanks. :-)
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users