Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.043 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; 'python': 0.08; 'reply- to:addr:comp.lang.python': 0.09; 'to:addr:comp.lang.python': 0.09; 'error:': 0.10; '8bit%:72': 0.16; 'b()': 0.16; 'container.': 0.16; 'declaring': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.18; 'arguments': 0.18; 'jan': 0.19; 'cc:no real name:2**0': 0.20; 'subject:list': 0.21; "doesn't": 0.22; 'header:In-Reply-To:1': 0.22; 'produces': 0.23; 'subject:other': 0.23; 'defined': 0.24; 'cc:2**0': 0.24; 'posted': 0.25; 'code': 0.25; 'classes': 0.26; 'van': 0.28; 'fine.': 0.29; 'cc:addr:python.org': 0.29; 'error': 0.29; 'pm,': 0.29; 'class': 0.29; 'sun,': 0.30; 'typeerror:': 0.30; 'chris': 0.30; 'version': 0.32; 'quite': 0.32; 'list': 0.32; 'actual': 0.32; 'header:User-Agent:1': 0.33; 'actually': 0.33; 'object': 0.33; 'match': 0.34; 'from:addr:googlemail.com': 0.34; 'question,': 0.34; 'received:209.85.212': 0.34; 'too': 0.34; 'all.': 0.34; 'post': 0.36; 'properties': 0.36; 'minimal': 0.37; 'hello,': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.38; 'subject:from': 0.38; '(with': 0.39; 'received:209': 0.40; 'your': 0.61; '2012': 0.67; 'header:Reply-To:1': 0.71; 'reply- to:no real name:2**0': 0.72; 'bodies': 0.73; 'reply- to:addr:googlegroups.com': 0.74; '12:16': 0.84; 'derive': 0.84; 'troubles': 0.84; 'received:209.85.212.56': 0.91; 'received:mail- vw0-f56.google.com': 0.91; 'skip:2 50': 0.91 Newsgroups: comp.lang.python Date: Sat, 7 Jan 2012 22:08:22 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=1.168.129.93; posting-account=5JdMBQoAAABHnS4mjpqEzxnmWtgiiVNw References: User-Agent: G2/1.0 X-Google-Web-Client: true MIME-Version: 1.0 Subject: Re: multiple inheritance from list and other class From: 88888 Dihedral To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: comp.lang.python@googlegroups.com List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1326002905 news.xs4all.nl 6860 [2001:888:2000:d::a6]:40421 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:18662 A list is a container.=20 Chris Angelico=E6=96=BC 2012=E5=B9=B41=E6=9C=888=E6=97=A5=E6=98=9F=E6=9C=9F= =E6=97=A5UTC+8=E4=B8=8A=E5=8D=889=E6=99=8227=E5=88=8606=E7=A7=92=E5=AF=AB= =E9=81=93=EF=BC=9A > On Sun, Jan 8, 2012 at 12:16 PM, lars van gemerden wrote: > > Hello, > > > > I have an error message i do not understand: > > > > My code is in essence: > > > > b =3D B([1,2,3,4]) > > > > error: > > =C2=A0 =C2=A0b =3D B([0,1,2,3,4]) > > TypeError: B() takes exactly 2 arguments (1 given) >=20 > Your code doesn't quite match your error message, and the code as > posted (with 'pass' in the method bodies to make it compile) works > fine. Can you derive a minimal test-case that actually produces the > error in question, and then post the actual code and error? Also - > what version of Python are you using? >=20 > Chris Angelico The class is defined in a silly way.=20 In python declaring a class with only trivial properties added is=20 not very python at all. Just let an object obtain new properties to save the troubles of=20 deriving a lot classes not different too much. =20