Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #35835
| Date | 2012-12-31 14:34 +0800 |
|---|---|
| Subject | the class problem |
| From | contro opinion <contropinion@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1486.1356935666.29569.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
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?
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
the class problem contro opinion <contropinion@gmail.com> - 2012-12-31 14:34 +0800 Re: the class problem Tim Roberts <timr@probo.com> - 2013-01-01 11:31 -0800
csiph-web