Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #35833 > unrolled thread

Re: father class name

Started byAndrew Berg <bahamutzero8825@gmail.com>
First post2012-12-30 22:34 -0600
Last post2012-12-30 22:34 -0600
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: father class name Andrew Berg <bahamutzero8825@gmail.com> - 2012-12-30 22:34 -0600

#35833 — Re: father class name

FromAndrew Berg <bahamutzero8825@gmail.com>
Date2012-12-30 22:34 -0600
SubjectRe: father class name
Message-ID<mailman.1484.1356928506.29569.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web