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

References <ea2fbcde-053b-4512-987a-564d9c9fd164@t13g2000yqg.googlegroups.com>
Date 2012-01-08 12:27 +1100
Subject Re: multiple inheritance from list and other class
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.4521.1325986029.27778.python-list@python.org> (permalink)

Show all headers | 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