father class name

Andrew Berg bahamutzero8825 at gmail.com
Mon Dec 31 05:34:58 CET 2012


On 2012.12.30 22:18, contro opinion wrote:
> here is my haha  class
> class  haha(object):
>   def  theprint(self):
>     print "i am here"
> 
>>>> haha().theprint()
> i am here
>>>> haha(object).theprint()
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> TypeError: object.__new__() takes no parameters
> 
> why   haha(object).theprint()  get wrong output?
> 
> 
You have no __init__() method defined that would take parameters. What
are you trying to do?
-- 
CPython 3.3.0 | Windows NT 6.2.9200.16461



More information about the Python-list mailing list