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


Groups > comp.lang.python > #35840

Re: class problem

References <CA+YdQ_5xJBhka7HYTFPHFAJf-mNrNSPQszqSHaZWme0QxAL_SQ@mail.gmail.com>
Date 2012-12-30 22:55 -0800
Subject Re: class problem
From Chris Rebert <clp2@rebertia.com>
Newsgroups comp.lang.python
Message-ID <mailman.1491.1356936949.29569.python-list@python.org> (permalink)

Show all headers | View raw


On Sun, Dec 30, 2012 at 10:36 PM, contro opinion <contropinion@gmail.com> 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?

This marks the third time today that you've posted *this exact same
question* to python-list AKA comp.lang.python.
You received multiple answers the first time you posted it. Please
desist from posting it any further, lest ye get plonk-ed.
If you did not understand the responses you obtained, please reply in
the original thread and ask for clarification, rather than re-posting.

– Chris

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: class problem Chris Rebert <clp2@rebertia.com> - 2012-12-30 22:55 -0800

csiph-web