Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.glorb.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: 88888 Dihedral Newsgroups: comp.lang.python Subject: Re: multiple inheritance from list and other class Date: Sat, 7 Jan 2012 22:08:22 -0800 (PST) Organization: http://groups.google.com Lines: 34 Message-ID: <2328.1302.1326002902374.JavaMail.geo-discussion-forums@prnp7> References: Reply-To: comp.lang.python@googlegroups.com NNTP-Posting-Host: 1.168.129.93 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1326002990 17415 127.0.0.1 (8 Jan 2012 06:09:50 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 8 Jan 2012 06:09:50 +0000 (UTC) Cc: python-list@python.org In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=1.168.129.93; posting-account=5JdMBQoAAABHnS4mjpqEzxnmWtgiiVNw User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:18663 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