Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #35836 > unrolled thread
| Started by | contro opinion <contropinion@gmail.com> |
|---|---|
| First post | 2012-12-31 14:36 +0800 |
| Last post | 2012-12-31 14:36 +0800 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
class problem contro opinion <contropinion@gmail.com> - 2012-12-31 14:36 +0800
| From | contro opinion <contropinion@gmail.com> |
|---|---|
| Date | 2012-12-31 14:36 +0800 |
| Subject | class problem |
| Message-ID | <mailman.1487.1356935775.29569.python-list@python.org> |
[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 top | Article view | comp.lang.python
csiph-web