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


Groups > comp.lang.python > #18658

Re: multiple inheritance from list and other class

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!rt.uk.eu.org!news-transit.tcx.org.uk!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.025
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'python': 0.08; 'error:': 0.10; 'received:209.85.210.174': 0.13; 'received:mail- iy0-f174.google.com': 0.13; 'b()': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; 'arguments': 0.18; 'jan': 0.19; 'subject:list': 0.21; "doesn't": 0.22; 'header :In-Reply-To:1': 0.22; 'produces': 0.23; 'subject:other': 0.23; 'posted': 0.25; 'code': 0.25; 'van': 0.28; 'message- id:@mail.gmail.com': 0.28; 'fine.': 0.29; 'error': 0.29; 'pm,': 0.29; 'sun,': 0.30; 'typeerror:': 0.30; 'chris': 0.30; 'version': 0.32; 'quite': 0.32; 'actual': 0.32; 'actually': 0.33; 'match': 0.34; 'to:addr:python-list': 0.34; 'question,': 0.34; 'post': 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; 'to:addr:python.org': 0.40; 'your': 0.61; '2012': 0.67; 'bodies': 0.73; '12:16': 0.84; 'derive': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=+8jtwZ2u1Y+FO8OjXFaQmMiUJUcSStR/Piu4v5+5CSI=; b=t1Xl+pZcm3BkAm209+aDhriBYevG4aeXl3k8xhQgoNZryTsCGSETFmfeA4voCH/0k9 cP5YE0zjD5vHRHU7pvWPjwUd0FSqhHvgI/G+yi7r9dwmpZdUO4rR1rLIho2WeR1ctp07 H8esrzlpwx8A0slH9cOvj+oCcXGibCA5E3PNM=
MIME-Version 1.0
In-Reply-To <ea2fbcde-053b-4512-987a-564d9c9fd164@t13g2000yqg.googlegroups.com>
References <ea2fbcde-053b-4512-987a-564d9c9fd164@t13g2000yqg.googlegroups.com>
Date Sun, 8 Jan 2012 12:27:06 +1100
Subject Re: multiple inheritance from list and other class
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
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.4521.1325986029.27778.python-list@python.org> (permalink)
Lines 21
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1325986029 news.xs4all.nl 6893 [2001:888:2000:d::a6]:55427
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:18658

Show key headers only | View raw


On Sun, Jan 8, 2012 at 12:16 PM, lars van gemerden <lars@rational-it.com> wrote:
> Hello,
>
> I have an error message i do not understand:
>
> My code is in essence:
>
> b = B([1,2,3,4])
>
> error:
>    b = B([0,1,2,3,4])
> TypeError: B() takes exactly 2 arguments (1 given)

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?

Chris Angelico

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


Thread

multiple inheritance from list and other class lars van gemerden <lars@rational-it.com> - 2012-01-07 17:16 -0800
  Re: multiple inheritance from list and other class Chris Angelico <rosuav@gmail.com> - 2012-01-08 12:27 +1100
    Re: multiple inheritance from list and other class 88888 Dihedral <dihedral88888@googlemail.com> - 2012-01-07 22:08 -0800
    Re: multiple inheritance from list and other class 88888 Dihedral <dihedral88888@googlemail.com> - 2012-01-07 22:08 -0800
      Re: multiple inheritance from list and other class Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-01-08 06:41 +0000
  Re: multiple inheritance from list and other class Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-01-08 06:42 +0000
    Re: multiple inheritance from list and other class lars van gemerden <lars@rational-it.com> - 2012-01-08 02:48 -0800

csiph-web