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


Groups > comp.lang.python > #5481

Re: TypeError: __init__() takes exactly 1 positional argument (2 given)

References <fb474512-8d88-424b-b7ef-01e20d04478e@h36g2000pro.googlegroups.com> <mailman.1618.1305519199.9059.python-list@python.org> <70608e59-3316-44ce-9d98-2b170d497839@z15g2000prn.googlegroups.com>
Date 2011-05-15 21:44 -0700
Subject Re: TypeError: __init__() takes exactly 1 positional argument (2 given)
From Chris Rebert <clp2@rebertia.com>
Newsgroups comp.lang.python
Message-ID <mailman.1620.1305521071.9059.python-list@python.org> (permalink)

Show all headers | View raw


On Sun, May 15, 2011 at 9:30 PM, Gnarlodious <gnarlodious@gmail.com> wrote:
> I don't have a trace because I am using mod_wsgi under Apache. Maybe
> there is a way to debug using mod_wsgi but I haven't been able to
> figure out how.
>
> My problem is that in order to run mod_wsgi I had to downgrade to
> Python 3.1.3 which may be causing the problem. This website was
> running fine in Py3.2.
>
> I did find an explanation that sounds like this is an intentional
> deprecation in Python:
> <http://stackoverflow.com/questions/625083/python-init-and-self-what-
> do-they-do>
> <http://svn.python.org/view?revision=54539&view=revision>
>
> It looks like we are now expected to initialize instance variables
> with a setter statement?

Er, what are you talking about? That's always been the case; it's
nothing new at all.
Perhaps your "# do stuff" from earlier isn't doing the right stuff?
Posting the actual code would help.

Cheers,
Chris
--
http://rebertia.com

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


Thread

TypeError: __init__() takes exactly 1 positional argument (2 given) Gnarlodious <gnarlodious@gmail.com> - 2011-05-15 20:53 -0700
  Re: TypeError: __init__() takes exactly 1 positional argument (2 given) harrismh777 <harrismh777@charter.net> - 2011-05-15 22:59 -0500
  Re: TypeError: __init__() takes exactly 1 positional argument (2 given) Chris Rebert <clp2@rebertia.com> - 2011-05-15 21:10 -0700
  Re: TypeError: __init__() takes exactly 1 positional argument (2 given) Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-15 22:12 -0600
    Re: TypeError: __init__() takes exactly 1 positional argument (2 given) Gnarlodious <gnarlodious@gmail.com> - 2011-05-15 21:30 -0700
      Re: TypeError: __init__() takes exactly 1 positional argument (2 given) Chris Rebert <clp2@rebertia.com> - 2011-05-15 21:44 -0700
        Re: TypeError: __init__() takes exactly 1 positional argument (2 given) Gnarlodious <gnarlodious@gmail.com> - 2011-05-15 21:53 -0700
      Re: TypeError: __init__() takes exactly 1 positional argument (2 given) Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-15 22:54 -0600
        Re: TypeError: __init__() takes exactly 1 positional argument (2 given) Gnarlodious <gnarlodious@gmail.com> - 2011-05-15 22:08 -0700
  Re: TypeError: __init__() takes exactly 1 positional argument (2 given) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-05-16 04:31 +0000

csiph-web