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


Groups > comp.lang.python > #5483

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

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'debug': 0.03; 'instance': 0.05; 'python:': 0.05; 'initialize': 0.07; 'versions.': 0.07; 'python': 0.07; 'sun,': 0.09; 'pm,': 0.11; 'url:code': 0.11; 'wrote:': 0.14; 'explanation': 0.16; 'subject:() ': 0.16; 'url:revision': 0.16; 'url:svn': 0.16; 'this?': 0.18; 'figure': 0.18; 'fine': 0.18; 'trace': 0.19; 'maybe': 0.21; 'seeing': 0.21; 'header:In-Reply-To:1': 0.22; "haven't": 0.23; 'url:view': 0.24; 'url:wiki': 0.24; 'received:209.85.161.46': 0.26; 'received:mail- fx0-f46.google.com': 0.26; 'message-id:@mail.gmail.com': 0.28; 'looks': 0.28; 'received:209.85.161': 0.29; 'error': 0.29; 'problem': 0.29; 'variables': 0.29; 'all.': 0.30; 'to:addr:python- list': 0.32; 'using': 0.34; 'change': 0.34; 'there': 0.35; 'causing': 0.35; 'running': 0.36; 'think': 0.36; 'problem.': 0.36; 'received:209.85': 0.37; 'url:python': 0.37; 'run': 0.37; 'received:google.com': 0.38; 'but': 0.38; 'url:google': 0.38; 'url:org': 0.38; 'under': 0.39; 'to:addr:python.org': 0.39; 'subject: (': 0.39; 'received:209': 0.39; 'how': 0.39; 'would': 0.40; 'header:Received:5': 0.40; 'order': 0.61; '2011': 0.62; 'link': 0.62; 'url:p': 0.63; 'website': 0.66
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=dJFR34xH9iRbyTv/AUBv+ANR/sD7zUdvSYEM7gL3ZMc=; b=dVq6/HBZy4JaoibLVTUfL9qtoO4cXouvK7qCU9jaDNbdyh/AbuABpJgosvKCkAhSh9 6Mwxhk1bGDvZLaAy51BWKuKtW+verqZpLzHyS1TJ/3VfYTH5DXWoxm3Ev0BrC07WkKnE OGBv60ctfTFbGBWcQQEJ6mDsGR20YMClTZdkI=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=pUvNe1qWuxekU3feMKtwqJFPF7IZi1og0mYR7FxQ9yBBaKSIR9AGELyTxqiSbxuGNq Q2CpvQBh5tO18lbl34kBkZlhvaxI4qsqwDbU5CI2oj1E/QVK2MkurpZgXskvo6R2YO6p 2qcaFPFGbwbfOtpYzdT9ep2uOsmd2xxDO/tu4=
MIME-Version 1.0
In-Reply-To <70608e59-3316-44ce-9d98-2b170d497839@z15g2000prn.googlegroups.com>
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>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Sun, 15 May 2011 22:54:03 -0600
Subject Re: TypeError: __init__() takes exactly 1 positional argument (2 given)
To Python <python-list@python.org>
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1622.1305521675.9059.python-list@python.org> (permalink)
Lines 31
NNTP-Posting-Host 82.94.164.166
X-Trace 1305521675 news.xs4all.nl 41114 [::ffff:82.94.164.166]:41227
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:5483

Show key headers only | View raw


On Sun, May 15, 2011 at 10: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.

http://code.google.com/p/modwsgi/wiki/DebuggingTechniques

> 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>

I don't think those are related.  If it were an intentional change in
Python from 2007, then you would be seeing the error in both versions.
 I don't see how the stackoverflow link has any bearing on the error
at all.

> It looks like we are now expected to initialize instance variables
> with a setter statement?

You mean like this?

x = Foo()
x.y = z

No, there is no such expectation.

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