Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #35833
| Date | 2012-12-30 22:34 -0600 |
|---|---|
| From | Andrew Berg <bahamutzero8825@gmail.com> |
| Subject | Re: father class name |
| References | <CA+YdQ_6v3m5JH0PusuYffb9xa=U56sNGKxYmy_w0hU04V8ZvgQ@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1484.1356928506.29569.python-list@python.org> (permalink) |
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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: father class name Andrew Berg <bahamutzero8825@gmail.com> - 2012-12-30 22:34 -0600
csiph-web